linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7][ 1/5] video: mx3fb: Use devm_kzalloc
@ 2014-03-14  9:12 Denis Carikli
  2014-03-14  9:12 ` [PATCH v7][ 2/5] video: mx3fb: Add device tree suport Denis Carikli
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Denis Carikli @ 2014-03-14  9:12 UTC (permalink / raw)
  To: linux-arm-kernel

Replace kzalloc by devm_kzalloc and remove the kfree() calls.

Signed-off-by: Denis Carikli <denis@eukrea.com>
---
ChangeLog v6->v7:
- Removed the Cc from the patch, they went into 
  git send-email instead.
ChangeLog v5->v6:
 - New patch need
---
 drivers/video/fbdev/mx3fb.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index 142e860..ee95de8 100644
--- a/drivers/video/fbdev/mx3fb.c
+++ b/drivers/video/fbdev/mx3fb.c
@@ -1496,7 +1496,7 @@ static int mx3fb_probe(struct platform_device *pdev)
 	if (!sdc_reg)
 		return -EINVAL;
 
-	mx3fb = kzalloc(sizeof(*mx3fb), GFP_KERNEL);
+	mx3fb = devm_kzalloc(&pdev->dev, sizeof(*mx3fb), GFP_KERNEL);
 	if (!mx3fb)
 		return -ENOMEM;
 
@@ -1542,7 +1542,6 @@ ersdc0:
 	dmaengine_put();
 	iounmap(mx3fb->reg_base);
 eremap:
-	kfree(mx3fb);
 	dev_err(dev, "mx3fb: failed to register fb\n");
 	return ret;
 }
@@ -1561,7 +1560,6 @@ static int mx3fb_remove(struct platform_device *dev)
 	dmaengine_put();
 
 	iounmap(mx3fb->reg_base);
-	kfree(mx3fb);
 	return 0;
 }
 
-- 
1.7.9.5


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

end of thread, other threads:[~2014-08-22 22:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14  9:12 [PATCH v7][ 1/5] video: mx3fb: Use devm_kzalloc Denis Carikli
2014-03-14  9:12 ` [PATCH v7][ 2/5] video: mx3fb: Add device tree suport Denis Carikli
2014-03-14  9:12 ` [PATCH v7][ 3/5] video: mx3fb: Introduce regulator support Denis Carikli
2014-03-14  9:23   ` [PATCH v7][ 3/5] video: mx3fb: Introduce =?UTF-8?B?cmVndWxhdG9yIHN1c Alexander Shiyan
2014-03-14 11:23     ` [PATCH v7][ 3/5] video: mx3fb: Introduce regulator support Denis Carikli
2014-03-14 12:38       ` [PATCH v7][ 3/5] video: mx3fb: Introduce =?UTF-8?B?cmVndWxhdG9yIHN1c Alexander Shiyan
2014-03-17  6:20   ` [PATCH v7][ 3/5] video: mx3fb: Introduce regulator support Sascha Hauer
2014-06-10 13:29     ` Denis Carikli
2014-08-22 22:00       ` Mark Brown
2014-06-19  6:58   ` Denis Carikli
2014-03-14  9:12 ` [PATCH v7][ 4/5] ARM: dts: i.MX35: Add display support Denis Carikli
2014-03-14  9:12 ` =?UTF-8?q?=5BPATCH=20v7=5D=5B=205/5=5D=20ARM=3A=20dts=3A=20mbimxsd35=20Add=20video=20and=20displays= Denis Carikli
2014-05-08 10:31 ` [PATCH v7][ 1/5] video: mx3fb: Use devm_kzalloc Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).