imx-drm: parallel-display: Check 'mode' pointer first
authorFabio Estevam <fabio.estevam@freescale.com>
Wed, 26 Feb 2014 23:53:42 +0000 (20:53 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2014 22:57:43 +0000 (14:57 -0800)
commit39dcf4f708992318ba331319a69ff77db4e70864
tree4d2f10a875484c655a4bbaaa9ef62ee114273a8a
parent9f9b036f0e5ee1ea4f0487a793542ca7ba06de35
imx-drm: parallel-display: Check 'mode' pointer first

Fix the following static checker warnings:

drivers/staging/imx-drm/parallel-display.c:64 imx_pd_connector_get_modes() error: potential null dereference 'mode'.  (drm_mode_create returns null)
drivers/staging/imx-drm/parallel-display.c:73 imx_pd_connector_get_modes() error: potential null dereference 'mode'.  (drm_mode_create returns null)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/parallel-display.c