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

Fix the following static checker warning:

drivers/staging/imx-drm/imx-ldb.c:109 imx_ldb_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/imx-ldb.c