1
0
Fork 0

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>
hifive-unleashed-5.1
Wei Yongjun 2016-09-10 12:03:42 +00:00 committed by Herbert Xu
parent 31b2a73c9c
commit 94879fa822
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}