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 hwrng: printk replacement 2014-10-02 14:35:00 +08:00
atmel-rng.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
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 hwrng: core - sleep interruptible in read 2015-12-04 22:21:45 +08:00
exynos-rng.c hwrng: exynos - fixup IO accesors 2016-06-13 17:47:50 +08:00
geode-rng.c hwrng: printk replacement 2014-10-02 14:35:00 +08:00
hisi-rng.c hwrng: hisi - Add support for Hisilicon SoC RNG 2016-04-15 22:36:36 +08:00
intel-rng.c hwrng: printk replacement 2014-10-02 14:35:00 +08:00
iproc-rng200.c hwrng: iproc-rng200 - make use of devm_hwrng_register 2015-03-16 21:45:56 +11:00
ixp4xx-rng.c IXP4xx: HW pseudo-random generator is available on IXP45x/46x only. 2012-11-22 03:35:39 +00:00
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 hwrng: msm - make use of devm_hwrng_register 2015-03-16 21:45:55 +11:00
mxc-rnga.c hwrng: mxc-rnga - Use the preferred format for kzalloc 2015-09-21 22:00:39 +08:00
n2-asm.S sparc64: Add Niagara2 RNG driver. 2008-07-18 00:46:09 -07:00
n2-drv.c hwrng: n2 - Attach on T5/M5, T7/M7 SPARC CPUs 2016-01-26 22:35:30 +08:00
n2rng.h n2rng: Attach on Niagara-T3. 2011-07-28 01:26:30 -07:00
nomadik-rng.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-04-03 09:28:16 -07:00
octeon-rng.c hwrng: octeon - Use devm_hwrng_register 2015-09-21 22:00:38 +08:00
omap3-rom-rng.c hwrng: omap3-rom - convert timer to delayed work 2015-11-23 20:55:54 +08:00
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 hwrng: Fix module autoload for OF platform drivers 2015-09-21 22:00:39 +08:00
pic32-rng.c hwrng: pic32 - Add PIC32 RNG hardware driver 2016-02-17 04:07:48 +08:00
powernv-rng.c char: constify of_device_id array 2015-03-16 21:10:28 +01:00
pseries-rng.c hwrng: pseries - remove incorrect __init/__exit markups 2015-03-12 01:11:06 +11:00
st-rng.c hwrng: st - Improve FIFO size/depth description 2015-10-08 21:42:25 +08:00
stm32-rng.c hwrng: stm32 - fix maybe uninitialized variable warning 2016-05-31 16:41:57 +08:00
timeriomem-rng.c char: hw_random: drop owner assignment from platform_drivers 2014-10-20 16:20:20 +02:00
tpm-rng.c hw_random: add support for the TPM chip as a hardware RNG source 2012-08-22 11:11:41 -05:00
tx4939-rng.c char: hw_random: drop owner assignment from platform_drivers 2014-10-20 16:20:20 +02:00
via-rng.c x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros 2015-12-19 11:49:55 +01:00
virtio-rng.c hwrng: virtio - drop extra empty line 2015-01-26 11:34:23 +11:00
xgene-rng.c hwrng: xgene - fix handling platform_get_irq 2015-09-21 22:57:37 +08:00