mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: "Munegowda, Keshava" <keshava_mgowda@ti.com>
Cc: Axel Lin <axel.lin@gmail.com>,
	linux-kernel@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH] mfd: Fix omap_usbhs_alloc_children error handling
Date: Mon, 16 May 2011 14:12:28 +0300	[thread overview]
Message-ID: <20110516111227.GX11339@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <BANLkTinQkekfnR=zc4TJfU3qSHarKQsUcg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1839 bytes --]

Hi,

On Mon, May 16, 2011 at 04:33:58PM +0530, Munegowda, Keshava wrote:
> On Sat, May 14, 2011 at 11:45 AM, Axel Lin <axel.lin@gmail.com> wrote:
> > 1. Return proper error if omap_usbhs_alloc_child fails
> > 2. In the case of goto err_ehci, we should call platform_device_unregister(ehci)
> >   instead of platform_device_put(ehci) because we have already added the
> >   platform device to device hierarchy.
> >
> > Signed-off-by: Axel Lin <axel.lin@gmail.com>
> > ---
> >  drivers/mfd/omap-usb-host.c |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> > index 3ab9ffa..344f518 100644
> > --- a/drivers/mfd/omap-usb-host.c
> > +++ b/drivers/mfd/omap-usb-host.c
> > @@ -281,6 +281,7 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
> >
> >        if (!ehci) {
> >                dev_err(dev, "omap_usbhs_alloc_child failed\n");
> > +               ret = -ENOMEM;
> >                goto err_end;
> >        }
> >
> > @@ -304,13 +305,14 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
> >                sizeof(*ohci_data), dev);
> >        if (!ohci) {
> >                dev_err(dev, "omap_usbhs_alloc_child failed\n");
> > +               ret = -ENOMEM;
> >                goto err_ehci;
> >        }
> >
> >        return 0;
> >
> >  err_ehci:
> > -       platform_device_put(ehci);
> > +       platform_device_unregister(ehci);
> >
> >  err_end:
> >        return ret;
> > --
> > 1.7.1
> >
> 
> Looks goo to me;
> 
> Balbi,
>       I will take this patch on top of hwmod and runtime pm patches?
> is it OK for you.

It's ok. Just be sure to split the series correctly:

arch/arm/*omap*/ -> to Tony
drivers/mfd/* -> to Samuel

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2011-05-16 11:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-14  6:15 Axel Lin
2011-05-16 11:03 ` Munegowda, Keshava
2011-05-16 11:12   ` Felipe Balbi [this message]
2011-05-22 19:09 ` Samuel Ortiz

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=20110516111227.GX11339@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --cc=axel.lin@gmail.com \
    --cc=keshava_mgowda@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.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

all inboxes | Powered by JetHome®