1
0
Fork 0

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>
wifi-calibration
Libo Chen 2013-05-17 05:21:31 +00:00 committed by Ralf Baechle
parent 48c4ac976a
commit bda97ed39b
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}