[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110516111227.GX11339@legolas.emea.dhcp.ti.com>
Date: Mon, 16 May 2011 14:12:28 +0300
From: Felipe Balbi <balbi@...com>
To: "Munegowda, Keshava" <keshava_mgowda@...com>
Cc: Axel Lin <axel.lin@...il.com>, linux-kernel@...r.kernel.org,
Felipe Balbi <balbi@...com>,
Samuel Ortiz <sameo@...ux.intel.com>
Subject: Re: [PATCH] mfd: Fix omap_usbhs_alloc_children error handling
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@...il.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@...il.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
Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)
Powered by blists - more mailing lists