* [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe()
@ 2016-09-10 12:03 Wei Yongjun
2016-09-12 7:27 ` Patrice Chotard
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Wei Yongjun @ 2016-09-10 12:03 UTC (permalink / raw)
To: linux-arm-kernel
From: Wei Yongjun <weiyongjun1@huawei.com>
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>
---
drivers/char/hw_random/st-rng.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
index 7e8aa6b..938ec10 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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe()
2016-09-10 12:03 [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() Wei Yongjun
@ 2016-09-12 7:27 ` Patrice Chotard
2016-09-12 8:31 ` [STLinux Kernel] " Peter Griffin
2016-09-13 12:41 ` Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Patrice Chotard @ 2016-09-12 7:27 UTC (permalink / raw)
To: linux-arm-kernel
Hi Wey
On 09/10/2016 02:03 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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>
> ---
> drivers/char/hw_random/st-rng.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
> index 7e8aa6b..938ec10 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;
> }
>
>
>
>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* [STLinux Kernel] [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe()
2016-09-10 12:03 [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() Wei Yongjun
2016-09-12 7:27 ` Patrice Chotard
@ 2016-09-12 8:31 ` Peter Griffin
2016-09-13 12:41 ` Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Peter Griffin @ 2016-09-12 8:31 UTC (permalink / raw)
To: linux-arm-kernel
Hi Wei,
On Sat, 10 Sep 2016, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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>
> ---
> drivers/char/hw_random/st-rng.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/char/hw_random/st-rng.c b/drivers/char/hw_random/st-rng.c
> index 7e8aa6b..938ec10 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;
> }
>
>
Acked-by: Peter Griffin <peter.griffin@linaro.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe()
2016-09-10 12:03 [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() Wei Yongjun
2016-09-12 7:27 ` Patrice Chotard
2016-09-12 8:31 ` [STLinux Kernel] " Peter Griffin
@ 2016-09-13 12:41 ` Herbert Xu
2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2016-09-13 12:41 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Sep 10, 2016 at 12:03:42PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 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>
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-13 12:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-10 12:03 [PATCH -next] hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() Wei Yongjun
2016-09-12 7:27 ` Patrice Chotard
2016-09-12 8:31 ` [STLinux Kernel] " Peter Griffin
2016-09-13 12:41 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).