Commit ae9b79c6 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Chris Ball

mmc: omap: Convert to devm_kzalloc

Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarChris Ball <chris@printf.net>
parent 0e5c93e0
......@@ -1345,7 +1345,8 @@ static int mmc_omap_probe(struct platform_device *pdev)
if (res == NULL)
return -EBUSY;
host = kzalloc(sizeof(struct mmc_omap_host), GFP_KERNEL);
host = devm_kzalloc(&pdev->dev, sizeof(struct mmc_omap_host),
GFP_KERNEL);
if (host == NULL) {
ret = -ENOMEM;
goto err_free_mem_region;
......@@ -1465,7 +1466,6 @@ static int mmc_omap_probe(struct platform_device *pdev)
err_free_mmc_host:
iounmap(host->virt_base);
err_ioremap:
kfree(host);
err_free_mem_region:
release_mem_region(res->start, resource_size(res));
return ret;
......@@ -1500,8 +1500,6 @@ static int mmc_omap_remove(struct platform_device *pdev)
pdev->resource[0].end - pdev->resource[0].start + 1);
destroy_workqueue(host->mmc_omap_wq);
kfree(host);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment