summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/rockchip-rng.c
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2024-08-21 20:12:35 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2024-08-30 12:22:31 +0200
commit866ff78da10178cf98600f59ea353fb1b2b7976e (patch)
tree407ee7c57e6c46d43ae1f33fca560b8540e6cdc3 /drivers/char/hw_random/rockchip-rng.c
parenthwrng: rockchip - rst is used only during probe (diff)
downloadlinux-866ff78da10178cf98600f59ea353fb1b2b7976e.tar.xz
linux-866ff78da10178cf98600f59ea353fb1b2b7976e.zip
hwrng: rockchip - handle devm_pm_runtime_enable errors
It's unlikely that devm_pm_runtime_enable ever fails. Still, it makes sense to read the return value and handle errors. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--drivers/char/hw_random/rockchip-rng.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/hw_random/rockchip-rng.c b/drivers/char/hw_random/rockchip-rng.c
index 0dff9de64bc5..289b385bbf05 100644
--- a/drivers/char/hw_random/rockchip-rng.c
+++ b/drivers/char/hw_random/rockchip-rng.c
@@ -169,7 +169,9 @@ static int rk_rng_probe(struct platform_device *pdev)
pm_runtime_set_autosuspend_delay(dev, RK_RNG_AUTOSUSPEND_DELAY);
pm_runtime_use_autosuspend(dev);
- devm_pm_runtime_enable(dev);
+ ret = devm_pm_runtime_enable(dev);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret, "Runtime pm activation failed.\n");
ret = devm_hwrng_register(dev, &rk_rng->rng);
if (ret)