Skip to content
Snippets Groups Projects
Commit 11076f0c authored by Nikolay Dimitrov's avatar Nikolay Dimitrov Committed by Stefano Babic
Browse files

mx6: video_skip: Fix crash on NULL pointer


Signed-off-by: default avatarNikolay Dimitrov <picmaster@mail.bg>
Cc: Stefano Babic <sbabic@denx.de>
parent 75f2ba42
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment