Skip to content

Commit 0872b2c

Browse files
AnnYugawahdeller
authored andcommitted
fbdev: mmp: fix value check in mmphw_probe()
in mmphw_probe(), check the return value of clk_prepare_enable() and return the error code if clk_prepare_enable() returns an unexpected value. Fixes: d63028c ("video: mmp display controller support") Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 43a1120 commit 0872b2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/video/fbdev/mmp/hw/mmp_ctrl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,9 @@ static int mmphw_probe(struct platform_device *pdev)
519519
"unable to get clk %s\n", mi->clk_name);
520520
goto failed;
521521
}
522-
clk_prepare_enable(ctrl->clk);
522+
ret = clk_prepare_enable(ctrl->clk);
523+
if (ret)
524+
goto failed;
523525

524526
/* init global regs */
525527
ctrl_set_default(ctrl);

0 commit comments

Comments
 (0)