projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nouveau/u_memcpya: fix NULL vs error pointer bug
[platform/kernel/linux-starfive.git]
/
drivers
/
gpu
/
drm
/
nouveau
/
nouveau_drv.h
diff --git
a/drivers/gpu/drm/nouveau/nouveau_drv.h
b/drivers/gpu/drm/nouveau/nouveau_drv.h
index
3666a74
..
e73a233
100644
(file)
--- a/
drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/
drivers/gpu/drm/nouveau/nouveau_drv.h
@@
-193,7
+193,7
@@
u_memcpya(uint64_t user, unsigned int nmemb, unsigned int size)
size_t bytes;
if (unlikely(check_mul_overflow(nmemb, size, &bytes)))
- return
NULL
;
+ return
ERR_PTR(-EOVERFLOW)
;
return vmemdup_user(userptr, bytes);
}