[PATCH 1/2] drm/crtc_helper/set_config: Remove redundant handling when set->fb is NULL

Liu Ying gnuiyl at gmail.com
Wed Jan 13 22:00:09 PST 2016


We've done sanity NULL pointer check on set->fb at the beginning of
drm_crtc_helper_set_config() and bailed out if necessary, thus any later on
check or case handling is redundant.

Signed-off-by: Liu Ying <gnuiyl at gmail.com>
---
 drivers/gpu/drm/drm_crtc_helper.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index ef53475..cd3fbc1 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -541,8 +541,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
 		if (set->crtc->primary->fb == NULL) {
 			DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
 			mode_changed = true;
-		} else if (set->fb == NULL) {
-			mode_changed = true;
 		} else if (set->fb->pixel_format !=
 			   set->crtc->primary->fb->pixel_format) {
 			mode_changed = true;
-- 
2.5.0



More information about the dri-devel mailing list