linux-stable/drivers/ssb
Rand Deeb 5fe7bdbe4f ssb: Fix division by zero issue in ssb_calc_clock_rate
[ Upstream commit e0b5127fa1 ]

In ssb_calc_clock_rate(), there is a potential issue where the value of
m1 could be zero due to initialization using clkfactor_f6_resolv(). This
situation raised concerns about the possibility of a division by zero
error.

We fixed it by following the suggestions provided by Larry Finger
<Larry.Finger@lwfinger.net> and Michael Büsch <m@bues.ch>. The fix
involves returning a value of 1 instead of 0 in clkfactor_f6_resolv().
This modification ensures the proper functioning of the code and
eliminates the risk of division by zero errors.

Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Büsch <m@bues.ch>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230904232346.34991-1-rand.sec96@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-04 13:17:32 +02:00
..
b43_pci_bridge.c
bridge_pcmcia_80211.c
driver_chipcommon_pmu.c
driver_chipcommon_sflash.c
driver_chipcommon.c
driver_extif.c
driver_gige.c
driver_gpio.c
driver_mipscore.c
driver_pcicore.c
embedded.c
host_soc.c
Kconfig
main.c ssb: Fix division by zero issue in ssb_calc_clock_rate 2024-09-04 13:17:32 +02:00
Makefile
pci.c
pcihost_wrapper.c
pcmcia.c
scan.c
sdio.c
sprom.c
ssb_private.h