From: Wei Yongjun Date: Fri, 11 Nov 2016 14:56:47 +0000 (+0000) Subject: hwrng: atmel - use clk_disable_unprepare instead of clk_disable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b516b88a7946c92d418c8ad2673b94ea568d1cf5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git hwrng: atmel - use clk_disable_unprepare instead of clk_disable Since clk_prepare_enable() is used to get trng->clk, we should use clk_disable_unprepare() to release it for the error path. Signed-off-by: Wei Yongjun Acked-by: Nicolas Ferre Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index ae7cae579eac..661c82cde0f2 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c @@ -94,7 +94,7 @@ static int atmel_trng_probe(struct platform_device *pdev) return 0; err_register: - clk_disable(trng->clk); + clk_disable_unprepare(trng->clk); return ret; }