In function mxsfb_check_var an explicit null pointer dereference occurs
when input frame is 32 bpp (var->bits_per_pixel) and the output frame is
different from 8/16/18/24 (host->ld_intf_width).
Even though a 32bpp output is possible under certain conditions, this is
currently not implemented, so any other output bpp value is not valid.
Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
* This code is based on:
* Author: Vitaly Wool <vital@embeddedalley.com>
*
+ * Copyright 2017 NXP
* Copyright 2008-2015 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
*
/* real 24 bit */
rgb = def_rgb888;
break;
+ default:
+ /*
+ * 32-bit output is possible through I/O muxing, if this
+ * option is available on chip. Currently not
+ * implemented.
+ */
+ pr_debug("Currently unsupported output colour depth: %u\n",
+ host->ld_intf_width);
+ return -EINVAL;
}
break;
default: