The kernel boot stops at "Starting kernel ..." if assign cmdline
"video=mxcfb0:dev=lcd,if=RGB565".
The cause is that there's no 'mode_str' property for mxcfb0 in DTS file,
so of_property_read_string() does not touch it and 'mode_str' could be used
uninitialized in mxcfb_get_of_property(), where it's assigned to
plat_data->mode_str and then used uninitialized in fb_find_mode().
This may cause buffer overflow. This patch initializes 'mode_str' to NULL
to fix it.
Signed-off-by: Robby Cai <r63905@freescale.com>
(cherry picked from commit
115d11804b7b56d058ee6be8496b13f57869be93)
/*
- * Copyright 2004-2014 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2015 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
{
struct device_node *np = pdev->dev.of_node;
const char *disp_dev;
- const char *mode_str;
+ const char *mode_str = NULL;
const char *pixfmt;
int err;
int len;