[PATCH] drm: exynos: fix gem-prime support

Tomasz Stanislawski t.stanislaws at samsung.com
Tue Mar 6 06:07:01 PST 2012


From: Tomasz Stanislawski <t.stanislaws at samsung.com>

Fix error handling of dma_buf_export in exynos-drm driver.

Signed-off-by: Tomasz Stanislawski <t.stanislaws at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_dmabuf.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
index cbb6ad4..5f41de5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
@@ -200,7 +200,8 @@ int exynos_dmabuf_prime_handle_to_fd(struct drm_device *drm_dev,
 	 */
 	obj->export_dma_buf = dma_buf_export(obj, &exynos_dmabuf_ops,
 						obj->size, 0600);
-	if (!obj->export_dma_buf) {
+	if (IS_ERR(obj->export_dma_buf)) {
+		DRM_DEBUG_KMS("failed to export dmabuf.\n");
 		ret = PTR_ERR(obj->export_dma_buf);
 		goto err2;
 	}
-- 
1.7.5.4



More information about the dri-devel mailing list