diff options
author | Jarkko Nikula <jarkko.nikula@bitmer.com> | 2014-02-22 11:01:38 -0500 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-02-22 13:17:18 -0500 |
commit | ae9b79c634b91d60fecd8663324434219b68b10f (patch) | |
tree | da2132f02113d090eec09d71e6e88b81227208e5 /drivers/mmc/host/omap.c | |
parent | 0e5c93e0200e9759561377d51d5478134f50f7ee (diff) |
mmc: omap: Convert to devm_kzalloc
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/omap.c')
-rw-r--r-- | drivers/mmc/host/omap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 42b665dfaa73..927ed24d0708 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1345,7 +1345,8 @@ static int mmc_omap_probe(struct platform_device *pdev) | |||
1345 | if (res == NULL) | 1345 | if (res == NULL) |
1346 | return -EBUSY; | 1346 | return -EBUSY; |
1347 | 1347 | ||
1348 | host = kzalloc(sizeof(struct mmc_omap_host), GFP_KERNEL); | 1348 | host = devm_kzalloc(&pdev->dev, sizeof(struct mmc_omap_host), |
1349 | GFP_KERNEL); | ||
1349 | if (host == NULL) { | 1350 | if (host == NULL) { |
1350 | ret = -ENOMEM; | 1351 | ret = -ENOMEM; |
1351 | goto err_free_mem_region; | 1352 | goto err_free_mem_region; |
@@ -1465,7 +1466,6 @@ err_free_iclk: | |||
1465 | err_free_mmc_host: | 1466 | err_free_mmc_host: |
1466 | iounmap(host->virt_base); | 1467 | iounmap(host->virt_base); |
1467 | err_ioremap: | 1468 | err_ioremap: |
1468 | kfree(host); | ||
1469 | err_free_mem_region: | 1469 | err_free_mem_region: |
1470 | release_mem_region(res->start, resource_size(res)); | 1470 | release_mem_region(res->start, resource_size(res)); |
1471 | return ret; | 1471 | return ret; |
@@ -1500,8 +1500,6 @@ static int mmc_omap_remove(struct platform_device *pdev) | |||
1500 | pdev->resource[0].end - pdev->resource[0].start + 1); | 1500 | pdev->resource[0].end - pdev->resource[0].start + 1); |
1501 | destroy_workqueue(host->mmc_omap_wq); | 1501 | destroy_workqueue(host->mmc_omap_wq); |
1502 | 1502 | ||
1503 | kfree(host); | ||
1504 | |||
1505 | return 0; | 1503 | return 0; |
1506 | } | 1504 | } |
1507 | 1505 | ||