drm/armada: fix incorrect overlay plane cleanup
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 15 Jun 2015 09:13:30 +0000 (10:13 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 15 Jul 2015 15:45:29 +0000 (16:45 +0100)
The Armada overlay plane wasn't being properly cleaned up as it was
missing a call to drm_plane_cleanup().  It also wasn't freeing the
right type of pointer (although we were still freeing the right
pointer value.)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/armada/armada_overlay.c

index 0abf785f5d0f183c8a0715613d023ec5ff0f526c..f026ba062456ea9eee953fd452bd0e927fdb56a7 100644 (file)
@@ -279,7 +279,11 @@ static int armada_plane_disable(struct drm_plane *plane)
 
 static void armada_plane_destroy(struct drm_plane *plane)
 {
-       kfree(plane);
+       struct armada_plane *dplane = drm_to_armada_plane(plane);
+
+       drm_plane_cleanup(plane);
+
+       kfree(dplane);
 }
 
 static int armada_plane_set_property(struct drm_plane *plane,