summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Dimitrov <picmaster@mail.bg>2014-11-05 10:55:33 +0200
committerStefano Babic <sbabic@denx.de>2014-11-13 17:56:15 +0100
commit11076f0cac4cceff78fe673c52b6891ee9286471 (patch)
tree5735eb042910a218038a850a5d0e30dcfaa7d030
parent75f2ba42200177861f52bde131a837b0307f3daf (diff)
downloadu-boot-imx-11076f0cac4cceff78fe673c52b6891ee9286471.zip
u-boot-imx-11076f0cac4cceff78fe673c52b6891ee9286471.tar.gz
u-boot-imx-11076f0cac4cceff78fe673c52b6891ee9286471.tar.bz2
mx6: video_skip: Fix crash on NULL pointer
Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg> Cc: Stefano Babic <sbabic@denx.de>
-rw-r--r--arch/arm/imx-common/video.c6
1 files changed, 5 insertions, 1 deletions
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,