Message ID | 1452751210-19216-2-git-send-email-gnuiyl@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jan 14, 2016 at 02:00:10PM +0800, Liu Ying wrote: > We've done sanity NULL pointer check on set->mode at the beginning of > drm_crtc_helper_set_config() and bailed out if necessary, thus any later on > check is redundant. > > Signed-off-by: Liu Ying <gnuiyl@gmail.com> Both applied to drm-misc, thanks. -Daniel > --- > drivers/gpu/drm/drm_crtc_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c > index cd3fbc1..e333358 100644 > --- a/drivers/gpu/drm/drm_crtc_helper.c > +++ b/drivers/gpu/drm/drm_crtc_helper.c > @@ -551,7 +551,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) > if (set->x != set->crtc->x || set->y != set->crtc->y) > fb_changed = true; > > - if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) { > + if (!drm_mode_equal(set->mode, &set->crtc->mode)) { > DRM_DEBUG_KMS("modes are different, full mode set\n"); > drm_mode_debug_printmodeline(&set->crtc->mode); > drm_mode_debug_printmodeline(set->mode); > -- > 2.5.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index cd3fbc1..e333358 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -551,7 +551,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) if (set->x != set->crtc->x || set->y != set->crtc->y) fb_changed = true; - if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) { + if (!drm_mode_equal(set->mode, &set->crtc->mode)) { DRM_DEBUG_KMS("modes are different, full mode set\n"); drm_mode_debug_printmodeline(&set->crtc->mode); drm_mode_debug_printmodeline(set->mode);
We've done sanity NULL pointer check on set->mode at the beginning of drm_crtc_helper_set_config() and bailed out if necessary, thus any later on check is redundant. Signed-off-by: Liu Ying <gnuiyl@gmail.com> --- drivers/gpu/drm/drm_crtc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)