Skip to content

Commit

Permalink
fbdev: mmp: fix value check in mmphw_probe()
Browse files Browse the repository at this point in the history
commit 0872b2c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
AnnYugawa authored and gregkh committed Aug 23, 2023
1 parent 3461e64 commit 9fedcd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/fbdev/mmp/hw/mmp_ctrl.c
Expand Up @@ -519,7 +519,9 @@ static int mmphw_probe(struct platform_device *pdev)
"unable to get clk %s\n", mi->clk_name);
goto failed;
}
clk_prepare_enable(ctrl->clk);
ret = clk_prepare_enable(ctrl->clk);
if (ret)
goto failed;

/* init global regs */
ctrl_set_default(ctrl);
Expand Down

0 comments on commit 9fedcd0

Please sign in to comment.