aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/msm
diff options
context:
space:
mode:
authorPramod Gurav <pramod.gurav@smartplayin.com>2014-08-26 08:52:58 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-08-26 08:53:33 -0400
commitfbaa19df03f87c2aa6a3a0a14dd7d4c098d45643 (patch)
tree269fe7f5fb47b153cae855a72e2b5a85c810a77a /drivers/video/fbdev/msm
parent0c46575f7c7dea4068924f2c0d938232f68a5cda (diff)
msm: msm_fb: Move to using managed resources of kzalloc
Move to managed verion of kzalloc. Also checks return for failure case which was missing. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> CC: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> CC: Tomi Valkeinen <tomi.valkeinen@ti.com> CC: Stephen Boyd <sboyd@codeaurora.org> CC: Jingoo Han <jg1.han@samsung.com> CC: Rob Clark <robdclark@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/msm')
-rw-r--r--drivers/video/fbdev/msm/msm_fb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/msm_fb.c b/drivers/video/fbdev/msm/msm_fb.c
index 4640188ffd6e..2979d7e72126 100644
--- a/drivers/video/fbdev/msm/msm_fb.c
+++ b/drivers/video/fbdev/msm/msm_fb.c
@@ -569,8 +569,13 @@ static int msmfb_probe(struct platform_device *pdev)
569 mutex_init(&msmfb->panel_init_lock); 569 mutex_init(&msmfb->panel_init_lock);
570 init_waitqueue_head(&msmfb->frame_wq); 570 init_waitqueue_head(&msmfb->frame_wq);
571 INIT_WORK(&msmfb->resume_work, power_on_panel); 571 INIT_WORK(&msmfb->resume_work, power_on_panel);
572 msmfb->black = kzalloc(msmfb->fb->var.bits_per_pixel*msmfb->xres, 572 msmfb->black = devm_kzalloc(&pdev->dev,
573 GFP_KERNEL); 573 msmfb->fb->var.bits_per_pixel*msmfb->xres,
574 GFP_KERNEL);
575 if (!msmfb->black) {
576 ret = -ENOMEM;
577 goto error_register_framebuffer;
578 }
574 579
575 printk(KERN_INFO "msmfb_probe() installing %d x %d panel\n", 580 printk(KERN_INFO "msmfb_probe() installing %d x %d panel\n",
576 msmfb->xres, msmfb->yres); 581 msmfb->xres, msmfb->yres);