Skip to content

Commit

Permalink
hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_pr…
Browse files Browse the repository at this point in the history
…obe()

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>
  • Loading branch information
Wei Yongjun authored and Herbert Xu committed Sep 13, 2016
1 parent 31b2a73 commit 94879fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/char/hw_random/st-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 94879fa

Please sign in to comment.