diff options
author | Subash Patel <subash.rp@samsung.com> | 2012-06-25 11:22:57 -0700 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-07-27 11:13:55 +0900 |
commit | 0dd3b72cc66117e5c6dc638f55e4f2e5cc60ed70 (patch) | |
tree | fb7b0cc23b6f2403dcc6a665268c2d8226111e9e /drivers/gpu/drm | |
parent | 56fb5380c76d75d30b0e7acdfd36de34b4ee4375 (diff) | |
download | linux-0dd3b72cc66117e5c6dc638f55e4f2e5cc60ed70.tar.gz linux-0dd3b72cc66117e5c6dc638f55e4f2e5cc60ed70.tar.bz2 linux-0dd3b72cc66117e5c6dc638f55e4f2e5cc60ed70.zip |
drm/exynos: check for null in return value of dma_buf_map_attachment()
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c index cb29e474da8e..1687b72def52 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dmabuf.c @@ -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; } |