Re: [PATCH v2 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer

2018-10-04 Thread Maxime Ripard
Hi, On Wed, Oct 03, 2018 at 04:24:57PM +0200, Giulio Benetti wrote: > At the moment, the check of tcon->panel to be valid is wrong. IS_ERR() > has been used, but that macro doesn't check if tcon->panel pointer is > null or not, but check if tcon->panel is between -1 and -4095(MAX_ERRNO). > >

[PATCH v2 1/2] drm/sun4i: tcon: fix check of tcon->panel null pointer

2018-10-03 Thread Giulio Benetti
At the moment, the check of tcon->panel to be valid is wrong. IS_ERR() has been used, but that macro doesn't check if tcon->panel pointer is null or not, but check if tcon->panel is between -1 and -4095(MAX_ERRNO). Remove IS_ERR() from tcon->panel checking and let "if (tcon->panel)" as condition