Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fail:
if (crtc) {
- drm_crtc_cleanup(crtc);
- kfree(omap_crtc);
+ omap_crtc_destroy(crtc);
}
return NULL;
}
fail:
if (encoder) {
- drm_encoder_cleanup(encoder);
- kfree(omap_encoder);
+ omap_encoder_destroy(encoder);
}
return NULL;
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);
}