diff mbox series

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

Message ID 1546593046-41208-1-git-send-email-ye.li@nxp.com
State Accepted
Commit 3fd39937b1aeef3a4937b82f1efd6c101e156fd4
Delegated to: Anatolij Gustschin
Headers show
Series [U-Boot] imx: video: Fix return value issue | expand

Commit Message

Ye Li Jan. 4, 2019, 9:11 a.m. UTC
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>
---
 arch/arm/mach-imx/video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Peng Fan Jan. 5, 2019, 9:35 a.m. UTC | #1
> -----Original Message-----
> From: Ye Li
> Sent: 2019年1月4日 17:11
> To: sbabic@denx.de; u-boot@lists.denx.de
> Cc: Fabio Estevam <fabio.estevam@nxp.com>; Peng Fan
> <peng.fan@nxp.com>; dl-uboot-imx <uboot-imx@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@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@nxp.com>

> --
> 2.7.4
Anatolij Gustschin Jan. 28, 2019, 8:15 p.m. UTC | #2
On Fri, 4 Jan 2019 09:11:05 +0000
Ye Li ye.li@nxp.com wrote:

> 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>
> ---
>  arch/arm/mach-imx/video.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-video/master, thanks!

--
Anatolij
diff mbox series

Patch

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