fbdev: ep93xx-fb: fix return value check in ep93xxfb_probe

function clk_prepare_enable may fail in ep93xxfb_probe, therefore,
add a return value check to clk_prepare_enable and handle the
error.

Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Yuanjun Gong 2023-07-17 22:48:09 +08:00 committed by Helge Deller
parent 4e88761f5f
commit 9d5651ad2a

View File

@ -548,7 +548,9 @@ static int ep93xxfb_probe(struct platform_device *pdev)
}
ep93xxfb_set_par(info);
clk_prepare_enable(fbi->clk);
err = clk_prepare_enable(fbi->clk);
if (err)
goto failed_check;
err = register_framebuffer(info);
if (err)