Skip to content

Commit

Permalink
mmc: omap_hsmmc: fix host reference after mmc_free_host
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Balaji T K authored and Chris Ball committed Nov 7, 2012
1 parent cb27a84 commit 9d1f028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/omap_hsmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9d1f028

Please sign in to comment.