projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1987253
)
drm/msm: fix return value check in ERR_PTR()
author
Wei Yongjun
<yongjun_wei@trendmicro.com.cn>
Tue, 10 Sep 2013 22:56:12 +0000
(06:56 +0800)
committer
Rob Clark
<robdclark@gmail.com>
Wed, 11 Sep 2013 21:31:33 +0000
(17:31 -0400)
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>
drivers/gpu/drm/msm/msm_gem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/msm/msm_gem.c
b/drivers/gpu/drm/msm/msm_gem.c
index df0390f5ec58a60e18ace6c4d43091bebbd0cdac..5999b67ec8f19cf39a16a3e4d1b8b5347cab49b7 100644
(file)
--- a/
drivers/gpu/drm/msm/msm_gem.c
+++ b/
drivers/gpu/drm/msm/msm_gem.c
@@
-40,9
+40,9
@@
static struct page **get_pages(struct drm_gem_object *obj)
}
msm_obj->sgt = drm_prime_pages_to_sg(p, npages);
- if (
!msm_obj->sgt
) {
+ if (
IS_ERR(msm_obj->sgt)
) {
dev_err(dev->dev, "failed to allocate sgt\n");
- return ERR_
PTR(-ENOMEM
);
+ return ERR_
CAST(msm_obj->sgt
);
}
msm_obj->pages = p;