drm: plane: mutex_unlock() was missing
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 19 Dec 2011 22:06:41 +0000 (00:06 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Dec 2011 10:02:47 +0000 (10:02 +0000)
Unlock the mode_config mutex if drm_plane_init() fails.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c

index 255658906fcf0796c3c0ee0a32eb543907b6a0a7..7cb02f63b8e36489dc5afe4611288d51580669eb 100644 (file)
@@ -566,6 +566,7 @@ int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
        if (!plane->format_types) {
                DRM_DEBUG_KMS("out of memory when allocating plane\n");
                drm_mode_object_put(dev, &plane->base);
+               mutex_unlock(&dev->mode_config.mutex);
                return -ENOMEM;
        }