[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1308191334340.2313@hadrien>
Date: Mon, 19 Aug 2013 13:35:51 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Svenning Sørensen <sss@...omea.dk>
cc: Felipe Balbi <balbi@...com>, kernel-janitors@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] usb: musb: dsps: simplify
platform_get_resource_byname/devm_ioremap_resource
On Mon, 19 Aug 2013, Svenning Sørensen wrote:
> On 19-08-2013 10:51, Julia Lawall wrote:
> > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> > index 4ffbaac..f2f9710 100644
> > --- a/drivers/usb/musb/musb_dsps.c
> > +++ b/drivers/usb/musb/musb_dsps.c
> > @@ -357,9 +357,6 @@ static int dsps_musb_init(struct musb *musb)
> > u32 rev, val;
> > r = platform_get_resource_byname(parent, IORESOURCE_MEM, "control");
> > - if (!r)
> > - return -EINVAL;
> > -
> > reg_base = devm_ioremap_resource(dev, r);
> > if (!musb->ctrl_base)
> > return -EINVAL;
> Not really related to Julia's patch, apart from making it more obvious that
> there's a bug here.
> I believe it is reg_base that needs to be checked, right?
Indeed, it is all backwards. I could extend the patch, if you want.
julia
Powered by blists - more mailing lists