mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
drm/msm: fix return value check in _msm_gem_kernel_new()
In case of error, the function msm_gem_get_vaddr() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: 8223286d62 ("drm/msm: Add a helper function for in-kernel
buffer allocations")
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Rob Clark <[email protected]>
This commit is contained in:
parent
f44001e263
commit
c9811d0fa5
1 changed files with 2 additions and 2 deletions
|
|
@ -1045,10 +1045,10 @@ static void *_msm_gem_kernel_new(struct drm_device *dev, uint32_t size,
|
|||
}
|
||||
|
||||
vaddr = msm_gem_get_vaddr(obj);
|
||||
if (!vaddr) {
|
||||
if (IS_ERR(vaddr)) {
|
||||
msm_gem_put_iova(obj, aspace);
|
||||
drm_gem_object_unreference(obj);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return ERR_CAST(vaddr);
|
||||
}
|
||||
|
||||
if (bo)
|
||||
|
|
|
|||
Loading…
Reference in a new issue