[U-Boot] [PATCH] mx6: video_skip: Fix crash on NULL pointer
picmaster at mail.bg
picmaster at mail.bg
Wed Nov 5 09:55:33 CET 2014
From: Nikolay Dimitrov <picmaster at mail.bg>
Signed-off-by: Nikolay Dimitrov <picmaster at mail.bg>
Cc: Stefano Babic <sbabic at denx.de>
---
arch/arm/imx-common/video.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/imx-common/video.c b/arch/arm/imx-common/video.c
index 8651b80..46f8a1e 100644
--- a/arch/arm/imx-common/video.c
+++ b/arch/arm/imx-common/video.c
@@ -11,6 +11,7 @@ int board_video_skip(void)
int i;
int ret;
char const *panel = getenv("panel");
+
if (!panel) {
for (i = 0; i < display_count; i++) {
struct display_info_t const *dev = displays+i;
@@ -31,11 +32,14 @@ int board_video_skip(void)
break;
}
}
+
if (i < display_count) {
ret = ipuv3_fb_init(&displays[i].mode, 0,
displays[i].pixfmt);
if (!ret) {
- displays[i].enable(displays+i);
+ if (displays[i].enable)
+ displays[i].enable(displays + i);
+
printf("Display: %s (%ux%u)\n",
displays[i].mode.name,
displays[i].mode.xres,
--
1.7.10.4
More information about the U-Boot
mailing list