public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: linux-mmc@vger.kernel.org
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	Pierre Ossman <pierre@ossman.eu>,
	Martin Fuzzey <mfuzzey@gmail.com>,
	Pierre Ossman <drzeus@drzeus.cx>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mxcmmc: fix error path in mxcmci_probe
Date: Mon, 5 Oct 2009 21:46:47 +0200	[thread overview]
Message-ID: <20091005194647.GA5785@pengutronix.de> (raw)
In-Reply-To: <20090924095142.GL27039@pengutronix.de>

Hello,

On Thu, Sep 24, 2009 at 11:51:42AM +0200, Sascha Hauer wrote:
> On Thu, Sep 24, 2009 at 09:44:14AM +0200, Uwe Kleine-König wrote:
> > After a failing allocation of mmc or a failed ioremap in mxcmci_probe host was
> > used uninitialized.
> 
> Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > Cc: Sascha Hauer <s.hauer@pengutronix.de>
> > Cc: Pierre Ossman <pierre@ossman.eu>
> > Cc: Martin Fuzzey <mfuzzey@gmail.com>
> > Cc: Pierre Ossman <drzeus@drzeus.cx>
Cc: Andrew Morton <akpm@linux-foundation.org>

Anyone to pick up this patch?

> > ---
> >  drivers/mmc/host/mxcmmc.c |   10 +++++-----
> >  1 files changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> > index bc14bb1..bec4605 100644
> > --- a/drivers/mmc/host/mxcmmc.c
> > +++ b/drivers/mmc/host/mxcmmc.c
> > @@ -679,17 +679,17 @@ static int mxcmci_probe(struct platform_device *pdev)
> >  {
> >  	struct mmc_host *mmc;
> >  	struct mxcmci_host *host = NULL;
> > -	struct resource *r;
> > +	struct resource *iores, *r;
> >  	int ret = 0, irq;
> >  
> >  	printk(KERN_INFO "i.MX SDHC driver\n");
> >  
> > -	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >  	irq = platform_get_irq(pdev, 0);
> > -	if (!r || irq < 0)
> > +	if (!iores || irq < 0)
> >  		return -EINVAL;
> >  
> > -	r = request_mem_region(r->start, resource_size(r), pdev->name);
> > +	r = request_mem_region(iores->start, resource_size(iores), pdev->name);
> >  	if (!r)
> >  		return -EBUSY;
> >  
> > @@ -809,7 +809,7 @@ out_iounmap:
> >  out_free:
> >  	mmc_free_host(mmc);
> >  out_release_mem:
> > -	release_mem_region(host->res->start, resource_size(host->res));
> > +	release_mem_region(iores->start, resource_size(iores));
> >  	return ret;
> >  }
> >  
> > -- 
> > 1.6.4.3

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |

      reply	other threads:[~2009-10-05 19:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24  7:44 [PATCH] mxcmmc: fix error path in mxcmci_probe Uwe Kleine-König
2009-09-24  9:51 ` Sascha Hauer
2009-10-05 19:46   ` Uwe Kleine-König [this message]

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=20091005194647.GA5785@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=drzeus@drzeus.cx \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mfuzzey@gmail.com \
    --cc=pierre@ossman.eu \
    --cc=s.hauer@pengutronix.de \
    /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