Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: pxafb: Handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Arvind Yadav and committed by
Bartlomiej Zolnierkiewicz
86388d83 ac5b52d2

+4 -1
+4 -1
drivers/video/fbdev/pxafb.c
··· 1436 1436 pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3); 1437 1437 1438 1438 /* enable LCD controller clock */ 1439 - clk_prepare_enable(fbi->clk); 1439 + if (clk_prepare_enable(fbi->clk)) { 1440 + pr_err("%s: Failed to prepare clock\n", __func__); 1441 + return; 1442 + } 1440 1443 1441 1444 if (fbi->lccr0 & LCCR0_LCDT) 1442 1445 return;