diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2016-09-10 12:03:42 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-09-13 12:27:24 (GMT) |
commit | 94879fa82275f161f3b4fdabab00cd4d625781f3 (patch) | |
tree | e1a298e3941e35090560f0a402aac2640c1085df /drivers/char/hw_random | |
parent | 31b2a73c9c5f1f02c896c4e434957b831dd50a7f (diff) | |
download | linux-94879fa82275f161f3b4fdabab00cd4d625781f3.tar.xz |
hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe()
Fix the missing clk_disable_unprepare() before return
from st_rng_probe() in the error handling case.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/st-rng.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c index 7e8aa6b..938ec10 100644 --- a/drivers/char/hw_random/st-rng.c +++ b/drivers/char/hw_random/st-rng.c @@ -108,6 +108,7 @@ static int st_rng_probe(struct platform_device *pdev) ret = hwrng_register(&ddata->ops); if (ret) { dev_err(&pdev->dev, "Failed to register HW RNG\n"); + clk_disable_unprepare(clk); return ret; } |