* [PATCH] MIPS: drivers: fix clk leak
@ 2013-05-17 6:21 Libo Chen
2013-05-17 9:24 ` John Crispin
0 siblings, 1 reply; 2+ messages in thread
From: Libo Chen @ 2013-05-17 6:21 UTC (permalink / raw)
To: ralf, grant.likely, rob.herring; +Cc: linux-mips, LKML, Andrew Morton, Li Zefan
when gptu_r32 fail, we should put clk before return
Signed-off-by: Libo Chen <libo.chen@huawei.com>
---
arch/mips/lantiq/xway/gptu.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
index 9861c86..4fa577c 100644
--- a/arch/mips/lantiq/xway/gptu.c
+++ b/arch/mips/lantiq/xway/gptu.c
@@ -169,6 +169,8 @@ static int gptu_probe(struct platform_device *pdev)
if (((gptu_r32(GPTU_ID) >> 8) & 0xff) != GPTU_MAGIC) {
dev_err(&pdev->dev, "Failed to find magic\n");
gptu_hwexit();
+ clk_disable(clk);
+ clk_put(clk);
return -ENAVAIL;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: drivers: fix clk leak
2013-05-17 6:21 [PATCH] MIPS: drivers: fix clk leak Libo Chen
@ 2013-05-17 9:24 ` John Crispin
0 siblings, 0 replies; 2+ messages in thread
From: John Crispin @ 2013-05-17 9:24 UTC (permalink / raw)
To: Libo Chen
Cc: ralf, grant.likely, rob.herring, linux-mips, LKML, Andrew Morton,
Li Zefan
On 17/05/13 08:21, Libo Chen wrote:
>
> when gptu_r32 fail, we should put clk before return
>
> Signed-off-by: Libo Chen<libo.chen@huawei.com>
Acked-by: John Crispin <blogic@openwrt.org>
> ---
> arch/mips/lantiq/xway/gptu.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
> index 9861c86..4fa577c 100644
> --- a/arch/mips/lantiq/xway/gptu.c
> +++ b/arch/mips/lantiq/xway/gptu.c
> @@ -169,6 +169,8 @@ static int gptu_probe(struct platform_device *pdev)
> if (((gptu_r32(GPTU_ID)>> 8)& 0xff) != GPTU_MAGIC) {
> dev_err(&pdev->dev, "Failed to find magic\n");
> gptu_hwexit();
> + clk_disable(clk);
> + clk_put(clk);
> return -ENAVAIL;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-17 9:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-17 6:21 [PATCH] MIPS: drivers: fix clk leak Libo Chen
2013-05-17 9:24 ` John Crispin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox