Skip to content

Commit

Permalink
drm/exynos: check for null in return value of dma_buf_map_attachment()
Browse files Browse the repository at this point in the history
dma_buf_map_attachment() can return NULL and valid sg as return
value. Hence the check for the returned scatter-gather must be using
the inline function IS_ERR_OR_NULL() in place of IS_ERR()

Signed-off-by: Subash Patel <subash.ramaswamy@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
  • Loading branch information
Subash Patel authored and Inki Dae committed Jul 27, 2012
1 parent 56fb538 commit 0dd3b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/exynos/exynos_drm_dmabuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ struct drm_gem_object *exynos_dmabuf_prime_import(struct drm_device *drm_dev,


sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
if (IS_ERR(sgt)) {
if (IS_ERR_OR_NULL(sgt)) {
ret = PTR_ERR(sgt);
goto err_buf_detach;
}
Expand Down

0 comments on commit 0dd3b72

Please sign in to comment.