Re: [PATCH v2 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if null

2018-10-05 Thread Giulio Benetti
Hi, Il 04/10/2018 21:56, Maxime Ripard ha scritto: On Wed, Oct 03, 2018 at 04:24:58PM +0200, Giulio Benetti wrote: If using tcon with VGA, We don't have support for VGA at the moment. Or are you talking about using a VGA bridge? You're right, in general VGA is not the point. tcon->panel is

Re: [PATCH v2 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if null

2018-10-04 Thread Maxime Ripard
On Wed, Oct 03, 2018 at 04:24:58PM +0200, Giulio Benetti wrote: > If using tcon with VGA, We don't have support for VGA at the moment. Or are you talking about using a VGA bridge? > tcon->panel will be null(0), this will cause segmentation fault when > trying to dereference

[PATCH v2 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if null

2018-10-03 Thread Giulio Benetti
If using tcon with VGA, tcon->panel will be null(0), this will cause segmentation fault when trying to dereference tcon->panel->connector. Add tcon->panel null check before calling sun4i_tcon0_mode_set_dithering(). Signed-off-by: Giulio Benetti Fixes: f11adcecbd5f ("drm/sun4i: tcon: Add