drm: plane: mutex_unlock() was missing
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 Dec 2011 13:35:02 +0000 (15:35 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:08 +0000 (12:29 +0300)
Unlock the mode_config mutex if drm_plane_init() fails.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/gpu/drm/drm_crtc.c

index 57d5c42..5970ca6 100644 (file)
@@ -565,6 +565,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;
        }