From: Andrew Morton <akpm@linux-foundation.org>
To: Nicolas Pitre <nico@cam.org>
Cc: drzeus-mmc@drzeus.cx, linux-kernel@vger.kernel.org, maen@marvell.com
Subject: Re: [PATCH v2] SDIO driver for Marvell SoCs
Date: Thu, 19 Feb 2009 14:58:08 -0800 [thread overview]
Message-ID: <20090219145808.796135e4.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0902191708330.5511@xanadu.home>
On Thu, 19 Feb 2009 17:14:11 -0500 (EST)
Nicolas Pitre <nico@cam.org> wrote:
> This supports MMC/SD/SDIO currently found on the Kirkwood 88F6281 and
> 88F6192 SoC controllers.
--- a/drivers/mmc/host/mvsdio.c~sdio-driver-for-marvell-socs-update
+++ a/drivers/mmc/host/mvsdio.c
@@ -783,9 +783,9 @@ out:
gpio_free(host->gpio_write_protect);
if (host->base)
iounmap(host->base);
- if (host->res)
- release_resource(host->res);
}
+ if (r)
+ release_resource(host->res);
if (mmc)
mmc_free_host(mmc);
_
Nope, this will deref a null pointer on that error path and wouldn't
release the right thing anyway.
Something like this...
--- a/drivers/mmc/host/mvsdio.c~sdio-driver-for-marvell-socs-update
+++ a/drivers/mmc/host/mvsdio.c
@@ -688,6 +688,7 @@ static int __init mvsd_probe(struct plat
mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
if (!mmc) {
+ release_resource(r);
ret = -ENOMEM;
goto out;
}
next prev parent reply other threads:[~2009-02-19 22:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 4:46 [PATCH] SDIO driver for Marvell SoCs Nicolas Pitre
2009-02-19 20:44 ` Andrew Morton
2009-02-19 22:02 ` Nicolas Pitre
2009-02-19 22:53 ` Andrew Morton
2009-02-19 23:01 ` Harvey Harrison
2009-02-19 22:14 ` [PATCH v2] " Nicolas Pitre
2009-02-19 22:58 ` Andrew Morton [this message]
2009-02-20 1:41 ` Nicolas Pitre
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=20090219145808.796135e4.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=drzeus-mmc@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=maen@marvell.com \
--cc=nico@cam.org \
/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