diff mbox

[3/4,ARM] pxamci: fix a memory leak

Message ID 1290415596.5471.10.camel@mola (mailing list archive)
State New, archived
Headers show

Commit Message

axel lin Nov. 22, 2010, 8:46 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 7257738..d98e647 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -774,7 +774,7 @@  err_gpio_ro:
 	}
 	if (mmc)
 		mmc_free_host(mmc);
-	release_resource(r);
+	release_mem_region(r->start, SZ_4K);
 	return ret;
 }
 
@@ -824,7 +824,7 @@  static int pxamci_remove(struct platform_device *pdev)
 
 		clk_put(host->clk);
 
-		release_resource(host->res);
+		release_mem_region(host->res->start, SZ_4K);
 
 		mmc_free_host(mmc);
 	}