drm/sun4i: tcon: fix check of tcon->panel null pointer
authorGiulio Benetti <giulio.benetti@micronovasrl.com>
Fri, 5 Oct 2018 21:59:50 +0000 (23:59 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 8 Oct 2018 09:20:50 +0000 (11:20 +0200)
commit548ae867efb1741fa55cedb5e73d7d0e75acd1f2
tree61cf5131d510b313fe3b0e29f54b47067dfce22d
parent84c0851794d40b1f438343b371bb0eaa8d36a4a3
drm/sun4i: tcon: fix check of tcon->panel null pointer

Since tcon->panel is a pointer returned by of_drm_find_panel() need to
check if it is not NULL, hence a valid pointer.
IS_ERR() instead checks return error values, not NULL pointers.

Substitute "if (!IS_ERR(tcon->panel))" with "if (tcon->panel)".

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181005215951.99003-1-giulio.benetti@micronovasrl.com
drivers/gpu/drm/sun4i/sun4i_lvds.c
drivers/gpu/drm/sun4i/sun4i_rgb.c
drivers/gpu/drm/sun4i/sun4i_tcon.c