[U-Boot] [PATCH] imx: video: Fix return value issue

Peng Fan peng.fan at nxp.com
Sat Jan 5 09:35:55 UTC 2019



> -----Original Message-----
> From: Ye Li
> Sent: 2019年1月4日 17:11
> To: sbabic at denx.de; u-boot at lists.denx.de
> Cc: Fabio Estevam <fabio.estevam at nxp.com>; Peng Fan
> <peng.fan at nxp.com>; dl-uboot-imx <uboot-imx at nxp.com>
> Subject: [PATCH] imx: video: Fix return value issue
> 
> 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 at nxp.com>
> ---
>  arch/arm/mach-imx/video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/video.c b/arch/arm/mach-imx/video.c index
> b40ce53..953fe53 100644
> --- a/arch/arm/mach-imx/video.c
> +++ b/arch/arm/mach-imx/video.c
> @@ -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

Reviewed-by: Peng Fan <peng.fan at nxp.com>

> --
> 2.7.4



More information about the U-Boot mailing list