提交 94879fa8 编写于 作者: W Wei Yongjun 提交者: Herbert Xu

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: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NPatrice Chotard <patrice.chotard@st.com>
Acked-by: NPeter Griffin <peter.griffin@linaro.org>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 31b2a73c
...@@ -108,6 +108,7 @@ static int st_rng_probe(struct platform_device *pdev) ...@@ -108,6 +108,7 @@ static int st_rng_probe(struct platform_device *pdev)
ret = hwrng_register(&ddata->ops); ret = hwrng_register(&ddata->ops);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to register HW RNG\n"); dev_err(&pdev->dev, "Failed to register HW RNG\n");
clk_disable_unprepare(clk);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册