From: Wei Yongjun Date: Sat, 10 Sep 2016 12:03:42 +0000 (+0000) Subject: hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=94879fa82275f161f3b4fdabab00cd4d625781f3;p=linux-beck.git 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 Acked-by: Patrice Chotard Acked-by: Peter Griffin Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c index 7e8aa6b7b452..938ec10e733d 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; }