]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: omap_hsmmc: fix host reference after mmc_free_host
authorBalaji T K <balajitk@ti.com>
Mon, 15 Oct 2012 16:05:07 +0000 (21:35 +0530)
committerChris Ball <cjb@laptop.org>
Mon, 29 Oct 2012 16:54:19 +0000 (12:54 -0400)
struct omap_hsmmc_host *host should not be accessed after mmc_free_host().
Reorder mmc_free_host() after iounmap(host->base).

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/omap_hsmmc.c

index a33ab749bb0847c5d911169fc0d664476b8bcf36..a3929b773f206c5527d7736d9000afa7a6a29222 100644 (file)
@@ -2019,8 +2019,8 @@ static int __devexit omap_hsmmc_remove(struct platform_device *pdev)
                clk_put(host->dbclk);
        }
 
-       mmc_free_host(host->mmc);
        iounmap(host->base);
+       mmc_free_host(host->mmc);
        omap_hsmmc_gpio_free(pdev->dev.platform_data);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);