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

2018-10-03 Thread Chen-Yu Tsai
On Wed, Oct 3, 2018 at 5:59 AM Giulio Benetti wrote: > > 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(). > >

[PATCH 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 --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 3 ++- 1

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

2018-10-02 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 --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 3 ++- 1