Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bda97ed3 authored by Libo Chen's avatar Libo Chen Committed by Ralf Baechle
Browse files

MIPS: Xway: Fix clk leak



When gptu_r32 fails, we should put clk before returning.

Signed-off-by: default avatarLibo Chen <libo.chen@huawei.com>
Acked-by: default avatarJohn 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent 48c4ac97
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
	}