]> git.dujemihanovic.xyz Git - linux.git/commitdiff
fbdev: ep93xx-fb: fix return value check in ep93xxfb_probe
authorYuanjun Gong <ruc_gongyuanjun@163.com>
Mon, 17 Jul 2023 14:48:09 +0000 (22:48 +0800)
committerHelge Deller <deller@gmx.de>
Thu, 20 Jul 2023 05:52:55 +0000 (07:52 +0200)
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>
drivers/video/fbdev/ep93xx-fb.c

index 94fe52928be251eae5d3815bc0e0341ff45883c1..22158d9ca8ddf9a5a4ff883cae75716c561c038d 100644 (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)