drm/i915: remove unneeded visible check
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 24 Oct 2014 18:00:18 +0000 (19:00 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Nov 2014 22:21:55 +0000 (23:21 +0100)
The fb check introduced to drm_plane_helper_check_update() just make this
check impossible to branch in.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 46224c6307cb660779fe1a8fbaa433bdffb1d2b6..6e9d4e16d60fea4c812df71458b8a18894cbb124 100644 (file)
@@ -11639,23 +11639,12 @@ intel_check_primary_plane(struct drm_plane *plane,
        struct drm_rect *dest = &state->dst;
        struct drm_rect *src = &state->src;
        const struct drm_rect *clip = &state->clip;
-       int ret;
-
-       ret = drm_plane_helper_check_update(plane, crtc, fb,
-                                           src, dest, clip,
-                                           DRM_PLANE_HELPER_NO_SCALING,
-                                           DRM_PLANE_HELPER_NO_SCALING,
-                                           false, true, &state->visible);
-       if (ret)
-               return ret;
 
-       /* no fb bound */
-       if (state->visible && !fb) {
-               DRM_ERROR("No FB bound\n");
-               return -EINVAL;
-       }
-
-       return 0;
+       return drm_plane_helper_check_update(plane, crtc, fb,
+                                            src, dest, clip,
+                                            DRM_PLANE_HELPER_NO_SCALING,
+                                            DRM_PLANE_HELPER_NO_SCALING,
+                                            false, true, &state->visible);
 }
 
 static int