]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.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>
Wed, 7 Nov 2012 19:55:31 +0000 (14:55 -0500)
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 54bfd0cc106b92280cd75818310d81aa56c48ccb..d5057415d7d9f04275742144cd30d573a450dcef 100644 (file)
@@ -2009,8 +2009,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);