linux/drivers/char/hw_random
Nishanth Menon 61dc0a446e hwrng: omap - Fix assumption that runtime_get_sync will always succeed
pm_runtime_get_sync does return a error value that must be checked for
error conditions, else, due to various reasons, the device maynot be
enabled and the system will crash due to lack of clock to the hardware
module.

Before:
12.562784] [00000000] *pgd=fe193835
12.562792] Internal error: : 1406 [#1] SMP ARM
[...]
12.562864] CPU: 1 PID: 241 Comm: modprobe Not tainted 4.7.0-rc4-next-20160624 #2
12.562867] Hardware name: Generic DRA74X (Flattened Device Tree)
12.562872] task: ed51f140 ti: ed44c000 task.ti: ed44c000
12.562886] PC is at omap4_rng_init+0x20/0x84 [omap_rng]
12.562899] LR is at set_current_rng+0xc0/0x154 [rng_core]
[...]

After the proper checks:
[   94.366705] omap_rng 48090000.rng: _od_fail_runtime_resume: FIXME:
missing hwmod/omap_dev info
[   94.375767] omap_rng 48090000.rng: Failed to runtime_get device -19
[   94.382351] omap_rng 48090000.rng: initialization failed.

Fixes: 665d92fa85 ("hwrng: OMAP: convert to use runtime PM")
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-06-27 16:57:49 +08:00
..
amd-rng.c
atmel-rng.c
bcm63xx-rng.c hwrng: bcm63xx - fix device tree compilation 2016-04-05 20:23:11 +08:00
bcm2835-rng.c hwrng: bcm2835 - Add support for Broadcom BCM5301x 2016-06-24 21:24:58 +08:00
core.c
exynos-rng.c hwrng: exynos - fixup IO accesors 2016-06-13 17:47:50 +08:00
geode-rng.c
hisi-rng.c hwrng: hisi - Add support for Hisilicon SoC RNG 2016-04-15 22:36:36 +08:00
intel-rng.c
iproc-rng200.c
ixp4xx-rng.c
Kconfig hwrng: bcm2835 - Add support for Broadcom BCM5301x 2016-06-24 21:24:58 +08:00
Makefile hwrng: meson - Add Amlogic Meson Hardware Random Generator 2016-06-13 17:47:51 +08:00
meson-rng.c hwrng: meson - Add Amlogic Meson Hardware Random Generator 2016-06-13 17:47:51 +08:00
msm-rng.c
mxc-rnga.c
n2-asm.S
n2-drv.c hwrng: n2 - Attach on T5/M5, T7/M7 SPARC CPUs 2016-01-26 22:35:30 +08:00
n2rng.h
nomadik-rng.c
octeon-rng.c
omap3-rom-rng.c
omap-rng.c hwrng: omap - Fix assumption that runtime_get_sync will always succeed 2016-06-27 16:57:49 +08:00
pasemi-rng.c
pic32-rng.c hwrng: pic32 - Add PIC32 RNG hardware driver 2016-02-17 04:07:48 +08:00
powernv-rng.c
pseries-rng.c
st-rng.c
stm32-rng.c hwrng: stm32 - fix maybe uninitialized variable warning 2016-05-31 16:41:57 +08:00
timeriomem-rng.c
tpm-rng.c
tx4939-rng.c
via-rng.c
virtio-rng.c
xgene-rng.c