summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/mx3fb.c
diff options
context:
space:
mode:
authorDenis Carikli <denis@eukrea.com>2014-03-14 10:12:45 +0100
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-05-09 11:55:48 +0200
commitc58f66165d74cf48cd63f3ede137e1d2b7843f88 (patch)
tree604e5a70ac4377d813ad22c99f839185a8610541 /drivers/video/fbdev/mx3fb.c
parentvideo/nuc900: allow modular build (diff)
downloadlinux-c58f66165d74cf48cd63f3ede137e1d2b7843f88.tar.xz
linux-c58f66165d74cf48cd63f3ede137e1d2b7843f88.zip
video: mx3fb: Use devm_kzalloc
Replace kzalloc by devm_kzalloc and remove the kfree() calls. Signed-off-by: Denis Carikli <denis@eukrea.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/mx3fb.c')
-rw-r--r--drivers/video/fbdev/mx3fb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
index 142e860fb527..ee95de80a487 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;
}