drm/omap: fix missing unref to fb's buf object
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 8 Apr 2014 12:25:34 +0000 (15:25 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 14 Apr 2014 09:34:37 +0000 (12:34 +0300)
omap_fbdev_create() takes a reference to the fb's gem object with
omap_gem_get_paddr(). However, it never releases it with
omap_gem_put_paddr().

This patch adds the missing omap_gem_put_paddr() to omap_fbdev_free().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_fbdev.c

index 002988d09021daeebb04a1e42421ccf80d88cc54..1388ca7f87e84fefa07256cde5ebc07076e5087a 100644 (file)
@@ -371,6 +371,9 @@ void omap_fbdev_free(struct drm_device *dev)
 
        fbdev = to_omap_fbdev(priv->fbdev);
 
+       /* release the ref taken in omap_fbdev_create() */
+       omap_gem_put_paddr(fbdev->bo);
+
        /* this will free the backing object */
        if (fbdev->fb) {
                drm_framebuffer_unregister_private(fbdev->fb);