From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Venkatraman S <svenkatr@ti.com>
Cc: cjb@laptop.org, linux-mmc@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/3] mmc: omap_hsmmc: release correct resource
Date: Wed, 18 Apr 2012 10:58:47 +0100 [thread overview]
Message-ID: <20120418095847.GJ25053@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1334742553-11060-1-git-send-email-svenkatr@ti.com>
On Wed, Apr 18, 2012 at 03:19:11PM +0530, Venkatraman S wrote:
> From: Russell King - ARM Linux <linux@arm.linux.org.uk>
Please correct this to "Russell King <rmk+kernel@arm.linux.org.uk>"
>
> res can be one of several resources, as this variable is re-used several
> times during probe. This can cause the wrong resource parameters to be
> passed to release_mem_region().
>
> Get the original memory resource before calling release_mem_region().
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Venkatraman S <svenkatr@ti.com>
> ---
> drivers/mmc/host/omap_hsmmc.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 4254b6f..d15b149 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2042,7 +2042,9 @@ err1:
> err_alloc:
> omap_hsmmc_gpio_free(pdata);
> err:
> - release_mem_region(res->start, resource_size(res));
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (res)
> + release_mem_region(res->start, resource_size(res));
> return ret;
> }
>
> --
> 1.7.10.rc2
>
next prev parent reply other threads:[~2012-04-18 9:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 9:49 [PATCH 1/3] mmc: omap_hsmmc: release correct resource Venkatraman S
2012-04-18 9:49 ` [PATCH 2/3] mmc: omap_hsmmc: Add fclk frequency to debufs Venkatraman S
2012-04-19 0:04 ` Chris Ball
2012-04-19 4:25 ` S, Venkatraman
2012-04-19 4:36 ` Chris Ball
2012-04-19 4:53 ` [PATCH 1/2] " Venkatraman S
2012-04-18 9:49 ` [PATCH 3/3] mmc: omap_hsmmc: If probe fails, give out error messages Venkatraman S
2012-04-18 9:58 ` Russell King - ARM Linux [this message]
2012-04-18 10:26 ` [PATCH 1/3] mmc: omap_hsmmc: release correct resource S, Venkatraman
2012-04-18 10:27 ` [PATCH] " Venkatraman S
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=20120418095847.GJ25053@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=svenkatr@ti.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