projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fafb383
)
drm/exynos: fix return value check in lowlevel_buffer_allocate()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Tue, 10 Sep 2013 22:56:35 +0000
(06:56 +0800)
committer
Inki Dae
<inki.dae@samsung.com>
Mon, 16 Sep 2013 12:57:08 +0000
(21:57 +0900)
In case of error, the function drm_prime_pages_to_sg() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_buf.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/exynos/exynos_drm_buf.c
b/drivers/gpu/drm/exynos/exynos_drm_buf.c
index
d20a7af
..
9c80884
100644
(file)
--- a/
drivers/gpu/drm/exynos/exynos_drm_buf.c
+++ b/
drivers/gpu/drm/exynos/exynos_drm_buf.c
@@
-91,9
+91,9
@@
static int lowlevel_buffer_allocate(struct drm_device *dev,
}
buf->sgt = drm_prime_pages_to_sg(buf->pages, nr_pages);
- if (
!buf->sgt
) {
+ if (
IS_ERR(buf->sgt)
) {
DRM_ERROR("failed to get sg table.\n");
- ret =
-ENOMEM
;
+ ret =
PTR_ERR(buf->sgt)
;
goto err_free_attrs;
}