imx: video: Fix return value issue
authorYe Li <ye.li@nxp.com>
Fri, 4 Jan 2019 09:11:05 +0000 (09:11 +0000)
committerAnatolij Gustschin <agust@denx.de>
Mon, 28 Jan 2019 20:13:33 +0000 (21:13 +0100)
When framebuffer driver init is failed, we should return the err value not 0.
So the video init can exit immediately.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
arch/arm/mach-imx/video.c

index b40ce53405ae2af765549cd02c85540199781d61..953fe53cb49a3a0d4a80e2e03f34cf29c3e21688 100644 (file)
@@ -7,7 +7,7 @@
 int board_video_skip(void)
 {
        int i;
-       int ret;
+       int ret = 0;
        char const *panel = env_get("panel");
 
        if (!panel) {
@@ -50,7 +50,7 @@ int board_video_skip(void)
                return -EINVAL;
        }
 
-       return 0;
+       return ret;
 }
 
 #ifdef CONFIG_IMX_HDMI