aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-04-18 06:11:57 -0400
committerChris Ball <cjb@laptop.org>2012-04-22 11:17:42 -0400
commit48b332f9916f33ba0001b78e5cea49ef17f3c81e (patch)
tree0de29f015dd149a9081af86dec4836a25beb0c8e /drivers/mmc
parentca5879d3ffebd967e94b2dc3b1a3dc089709206f (diff)
mmc: omap_hsmmc: release correct resource
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> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/omap_hsmmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 4254b6f310aa..d15b149649bf 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2042,7 +2042,9 @@ err1:
2042err_alloc: 2042err_alloc:
2043 omap_hsmmc_gpio_free(pdata); 2043 omap_hsmmc_gpio_free(pdata);
2044err: 2044err:
2045 release_mem_region(res->start, resource_size(res)); 2045 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
2046 if (res)
2047 release_mem_region(res->start, resource_size(res));
2046 return ret; 2048 return ret;
2047} 2049}
2048 2050