diff options
author | Libo Chen <clbchenlibo.chen@huawei.com> | 2013-05-17 01:21:31 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-17 14:35:53 -0400 |
commit | bda97ed39b075e8ac125d4af7cdf60ca19449a16 (patch) | |
tree | 1f6ee96b6402acf6b8e9511d97a5dfa816e67e2b /arch/mips | |
parent | 48c4ac976ae995f263cde8f09578de86bc8e9f1d (diff) |
MIPS: Xway: Fix clk leak
When gptu_r32 fails, we should put clk before returning.
Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: John Crispin <blogic@openwrt.org>
Cc: grant.likely@linaro.org
Cc: rob.herring@calxeda.com,
Cc: linux-mips@linux-mips.org
Cc: LKML linux-kernel@vger.kernel.org
Cc: Andrew Morton akpm@linux-foundation.org
Cc: Li Zefan lizefan@huawei.com
Patchwork: https://patchwork.linux-mips.org/patch/5247/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | 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 9861c8669fab..4fa577c1ddfd 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) | |||
169 | if (((gptu_r32(GPTU_ID) >> 8) & 0xff) != GPTU_MAGIC) { | 169 | if (((gptu_r32(GPTU_ID) >> 8) & 0xff) != GPTU_MAGIC) { |
170 | dev_err(&pdev->dev, "Failed to find magic\n"); | 170 | dev_err(&pdev->dev, "Failed to find magic\n"); |
171 | gptu_hwexit(); | 171 | gptu_hwexit(); |
172 | clk_disable(clk); | ||
173 | clk_put(clk); | ||
172 | return -ENAVAIL; | 174 | return -ENAVAIL; |
173 | } | 175 | } |
174 | 176 | ||