All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] mmc: omap: Convert to devm_kzalloc
@ 2013-09-11 18:01 Jarkko Nikula
  2013-09-11 18:01 ` [PATCH 2/6] mmc: omap: Remove duplicate host->irq assignment Jarkko Nikula
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Jarkko Nikula @ 2013-09-11 18:01 UTC (permalink / raw)
  To: linux-mmc; +Cc: Chris Ball, Aaro Koskinen, Jarkko Nikula

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
---
 drivers/mmc/host/omap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c
index b94f38e..03179da 100644
--- a/drivers/mmc/host/omap.c
+++ b/drivers/mmc/host/omap.c
@@ -1354,7 +1354,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;
@@ -1473,7 +1474,6 @@ err_free_iclk:
 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;
@@ -1508,8 +1508,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;
 }
 
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-10-06 17:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 18:01 [PATCH 1/6] mmc: omap: Convert to devm_kzalloc Jarkko Nikula
2013-09-11 18:01 ` [PATCH 2/6] mmc: omap: Remove duplicate host->irq assignment Jarkko Nikula
2013-09-11 18:01 ` [PATCH 3/6] mmc: omap: Remove mem_res field from struct mmc_omap_host Jarkko Nikula
2013-09-11 18:01 ` [PATCH 4/6] mmc: omap: Convert to devm_ioremap_resource Jarkko Nikula
2013-09-11 18:01 ` [PATCH 5/6] mmc: omap: Remove always set use_dma flag from struct mmc_omap_host Jarkko Nikula
2013-09-11 18:01 ` [PATCH 6/6] mmc: omap: Get DMA request numbers via platform resource Jarkko Nikula
2013-10-06 17:41 ` [PATCH 1/6] mmc: omap: Convert to devm_kzalloc Jarkko Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.