Commit ec4c952d authored by Yuanjun Gong's avatar Yuanjun Gong Committed by sanglipeng
Browse files

fbdev: mmp: fix value check in mmphw_probe()

stable inclusion
from stable-v5.10.192
commit c5f59de36202cbd299f4ad6270167a8e545b4594
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I933RF

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c5f59de36202cbd299f4ad6270167a8e545b4594



--------------------------------

commit 0872b2c0 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: d63028c3 ("video: mmp display controller support")
Signed-off-by: default avatarYuanjun Gong <ruc_gongyuanjun@163.com>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 3ec487ae
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -518,7 +518,9 @@ static int mmphw_probe(struct platform_device *pdev)
		ret = -ENOENT;
		goto failed;
	}
	clk_prepare_enable(ctrl->clk);
	ret = clk_prepare_enable(ctrl->clk);
	if (ret)
		goto failed;

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