blob: e30e81793cf703dcb3569fa376787083699cd5f6 [file] [log] [blame]
From c313dd5f97c90836b20c027a3f161aee5f524deb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
Date: Tue, 1 Oct 2013 18:02:13 +0300
Subject: drm/i915: Kill a goto from sprite disable code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Let's not use goto when a simple if suffices. This is not error handling
code or anything, so the goto looks out of place.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 5f3fb46bbd643ddacde33fd5fe6f4db4ca963312)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/intel_sprite.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index b859f944b53b..b5e30b16a9cc 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -868,7 +868,6 @@ intel_disable_plane(struct drm_plane *plane)
struct drm_device *dev = plane->dev;
struct intel_plane *intel_plane = to_intel_plane(plane);
struct intel_crtc *intel_crtc;
- int ret = 0;
if (!plane->fb)
return 0;
@@ -883,20 +882,18 @@ intel_disable_plane(struct drm_plane *plane)
intel_plane->disable_plane(plane, plane->crtc);
}
- if (!intel_plane->obj)
- goto out;
-
- if (intel_crtc->active)
- intel_wait_for_vblank(dev, intel_plane->pipe);
+ if (intel_plane->obj) {
+ if (intel_crtc->active)
+ intel_wait_for_vblank(dev, intel_plane->pipe);
- mutex_lock(&dev->struct_mutex);
- intel_unpin_fb_obj(intel_plane->obj);
- mutex_unlock(&dev->struct_mutex);
+ mutex_lock(&dev->struct_mutex);
+ intel_unpin_fb_obj(intel_plane->obj);
+ mutex_unlock(&dev->struct_mutex);
- intel_plane->obj = NULL;
-out:
+ intel_plane->obj = NULL;
+ }
- return ret;
+ return 0;
}
static void intel_destroy_plane(struct drm_plane *plane)
--
1.8.5.rc3