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>