summaryrefslogtreecommitdiffstats
path: root/drivers/staging/omapdrm
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2011-12-09 23:26:07 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-12 16:37:52 -0800
commit65b0bd067df97737b9a13d92934d8f581cb0b07a (patch)
tree86fa4449d20a434d038205a2addd517d24006304 /drivers/staging/omapdrm
parentb369839b88d6ffd9ad5b4f9362d6bb09a0e16c10 (diff)
downloadlinux-65b0bd067df97737b9a13d92934d8f581cb0b07a.tar.gz
linux-65b0bd067df97737b9a13d92934d8f581cb0b07a.tar.bz2
linux-65b0bd067df97737b9a13d92934d8f581cb0b07a.zip
staging: drm/omap: crtc/encoder/fb destroy cleanups
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/omapdrm')
-rw-r--r--drivers/staging/omapdrm/omap_crtc.c3
-rw-r--r--drivers/staging/omapdrm/omap_encoder.c3
-rw-r--r--drivers/staging/omapdrm/omap_fb.c6
3 files changed, 4 insertions, 8 deletions
diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c
index fd09bcfab858..cffdf5e12394 100644
--- a/drivers/staging/omapdrm/omap_crtc.c
+++ b/drivers/staging/omapdrm/omap_crtc.c
@@ -320,8 +320,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
fail:
if (crtc) {
- drm_crtc_cleanup(crtc);
- kfree(omap_crtc);
+ omap_crtc_destroy(crtc);
}
return NULL;
}
diff --git a/drivers/staging/omapdrm/omap_encoder.c b/drivers/staging/omapdrm/omap_encoder.c
index 83bacd8fd362..06c52cb62d2f 100644
--- a/drivers/staging/omapdrm/omap_encoder.c
+++ b/drivers/staging/omapdrm/omap_encoder.c
@@ -164,8 +164,7 @@ struct drm_encoder *omap_encoder_init(struct drm_device *dev,
fail:
if (encoder) {
- drm_encoder_cleanup(encoder);
- kfree(omap_encoder);
+ omap_encoder_destroy(encoder);
}
return NULL;
diff --git a/drivers/staging/omapdrm/omap_fb.c b/drivers/staging/omapdrm/omap_fb.c
index 491be5395d85..3f62505813c2 100644
--- a/drivers/staging/omapdrm/omap_fb.c
+++ b/drivers/staging/omapdrm/omap_fb.c
@@ -53,11 +53,9 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb)
drm_framebuffer_cleanup(fb);
- if (omap_gem_put_paddr(omap_fb->bo)) {
- dev_err(dev->dev, "could not unmap!\n");
- }
-
if (omap_fb->bo) {
+ if (omap_fb->paddr && omap_gem_put_paddr(omap_fb->bo))
+ dev_err(dev->dev, "could not unmap!\n");
drm_gem_object_unreference_unlocked(omap_fb->bo);
}