Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbaa19df authored by Pramod Gurav's avatar Pramod Gurav Committed by Tomi Valkeinen
Browse files

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: default avatarPramod 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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 0c46575f
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -569,8 +569,13 @@ static int msmfb_probe(struct platform_device *pdev)
	mutex_init(&msmfb->panel_init_lock);
	init_waitqueue_head(&msmfb->frame_wq);
	INIT_WORK(&msmfb->resume_work, power_on_panel);
	msmfb->black = kzalloc(msmfb->fb->var.bits_per_pixel*msmfb->xres,
	msmfb->black = devm_kzalloc(&pdev->dev,
				    msmfb->fb->var.bits_per_pixel*msmfb->xres,
				    GFP_KERNEL);
	if (!msmfb->black) {
		ret = -ENOMEM;
		goto error_register_framebuffer;
	}

	printk(KERN_INFO "msmfb_probe() installing %d x %d panel\n",
	       msmfb->xres, msmfb->yres);