lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5195F730.6080103@phrozen.org>
Date:	Fri, 17 May 2013 11:24:00 +0200
From:	John Crispin <john@...ozen.org>
To:	Libo Chen <clbchenlibo.chen@...wei.com>
CC:	ralf@...ux-mips.org, grant.likely@...aro.org,
	rob.herring@...xeda.com, linux-mips@...ux-mips.org,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Li Zefan <lizefan@...wei.com>
Subject: Re: [PATCH] MIPS: drivers: fix clk leak

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@...wei.com>

Acked-by: John Crispin <blogic@...nwrt.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;
>   	}
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ