linux-yocto/drivers/char
Nishanth Menon f423806437 hwrng: ks-sa - fix division by zero in ks_sa_rng_init
[ Upstream commit 612b1dfeb414dfa780a6316014ceddf9a74ff5c0 ]

Fix division by zero in ks_sa_rng_init caused by missing clock
pointer initialization. The clk_get_rate() call is performed on
an uninitialized clk pointer, resulting in division by zero when
calculating delay values.

Add clock initialization code before using the clock.

Fixes: 6d01d8511d ("hwrng: ks-sa - Add minimum sleep time before ready-polling")
Signed-off-by: Nishanth Menon <nm@ti.com>

 drivers/char/hw_random/ks-sa-rng.c | 7 +++++++
 1 file changed, 7 insertions(+)
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 11:58:05 +02:00
..
agp
hw_random hwrng: ks-sa - fix division by zero in ks_sa_rng_init 2025-10-15 11:58:05 +02:00
ipmi ipmi: Fix strcpy source and destination the same 2025-08-28 16:28:29 +02:00
mwave
tpm tpm: tis: Double the timeout B to 4s 2025-05-22 14:12:12 +02:00
xilinx_hwicap
xillybus char: xillybus: Check USB endpoints when probing device 2024-08-29 17:33:11 +02:00
adi.c
apm-emulation.c
applicom.c
applicom.h
bsr.c
ds1620.c
dsp56k.c
dtlk.c
hangcheck-timer.c
hpet.c
Kconfig
lp.c
Makefile
mem.c
misc.c char: misc: Fix improper and inaccurate error code returned by misc_init() 2025-08-28 16:28:18 +02:00
mspec.c
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
powernv-op-panel.c
ppdev.c
ps3flash.c
random.c
scx200_gpio.c
sonypi.c
tlclk.c
toshiba.c
ttyprintk.c
uv_mmtimer.c
virtio_console.c virtio_console: fix missing byte order handling for cols and rows 2025-05-02 07:50:45 +02:00