DRM: Armada: destroy framebuffer after helper
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 27 Oct 2013 15:35:27 +0000 (15:35 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 10 Dec 2013 20:25:12 +0000 (20:25 +0000)
Destroy the framebuffer only after the helper, since the helper may
still be referencing the framebufer at this point.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/gpu/drm/armada/armada_fbdev.c

index 743570e99f900c8f8e06ff9572b9a297f0f25408..b348b16f81e2f596e8c35c6a4bbdfe8a0364ea0c 100644 (file)
@@ -202,11 +202,11 @@ void armada_fbdev_fini(struct drm_device *dev)
                        framebuffer_release(info);
                }
 
+               drm_fb_helper_fini(fbh);
+
                if (fbh->fb)
                        fbh->fb->funcs->destroy(fbh->fb);
 
-               drm_fb_helper_fini(fbh);
-
                priv->fbdev = NULL;
        }
 }