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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 May 2013 20:41:56 +0800
From:	Libo Chen <clbchenlibo.chen@...wei.com>
To:	<balbi@...com>, <gregkh@...uxfoundation.org>,
	<grant.likely@...aro.org>, <rob.herring@...xeda.com>,
	Li Zefan <lizefan@...wei.com>
CC:	<linux-usb@...r.kernel.org>, <linux-omap@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Subject: Re: [PATCH v2] usb: omap2430: fix memleak in err case

ping...

On 2013/5/22 11:30, Libo Chen wrote:
> 
> when omap_get_control_dev faild, we should release related platform_device
> 
> * Changelog from v1:
> 	* fix spell: s/fail/fails/, s/relational/related/ , thank Sergei <sergei.shtylyov@...entembedded.com>
> 
> Signed-off-by: Libo Chen <libo.chen@...wei.com>
> ---
>  drivers/usb/musb/omap2430.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 3551f1a..b626f19 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -549,7 +549,8 @@ static int omap2430_probe(struct platform_device *pdev)
>  		glue->control_otghs = omap_get_control_dev();
>  		if (IS_ERR(glue->control_otghs)) {
>  			dev_vdbg(&pdev->dev, "Failed to get control device\n");
> -			return -ENODEV;
> +			ret = -ENODEV;
> +			goto err2;
>  		}
>  	} else {
>  		glue->control_otghs = ERR_PTR(-ENODEV);
> 


--
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