linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Libo Chen <clbchenlibo.chen@huawei.com>
To: balbi@ti.com, gregkh@linuxfoundation.org,
	grant.likely@linaro.org, rob.herring@calxeda.com,
	Li Zefan <lizefan@huawei.com>
Cc: linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: Re: [PATCH v2] usb: omap2430: fix memleak in err case
Date: Tue, 28 May 2013 20:41:56 +0800	[thread overview]
Message-ID: <51A4A614.7080707@huawei.com> (raw)
In-Reply-To: <519C3BD1.6050307@huawei.com>

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@cogentembedded.com>
> 
> Signed-off-by: Libo Chen <libo.chen@huawei.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);
> 

  reply	other threads:[~2013-05-28 12:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5192E650.3070303@huawei.com>
2013-05-22  3:30 ` [PATCH v2] usb: omap2430: fix memleak in err case Libo Chen
2013-05-28 12:41   ` Libo Chen [this message]
2013-05-28 15:34     ` Andy Shevchenko
2013-05-29  0:52       ` Libo Chen
2013-05-28 17:40   ` Sergei Shtylyov
2013-05-29  2:47     ` Libo Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51A4A614.7080707@huawei.com \
    --to=clbchenlibo.chen@huawei.com \
    --cc=balbi@ti.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=rob.herring@calxeda.com \
    --cc=sergei.shtylyov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).