projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a676648
)
drm: use ENOMEM for drmm_kzalloc allocation failures
author
Niels Dossche
<dossche.niels@gmail.com>
Sat, 21 May 2022 23:41:04 +0000
(
01:41
+0200)
committer
Daniel Vetter
<daniel.vetter@ffwll.ch>
Wed, 25 May 2022 15:39:49 +0000
(17:39 +0200)
Other callers of drmm_kzalloc already return -ENOMEM on allocation
failure. Change EINVAL to ENOMEM for consistency.
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link:
https://patchwork.freedesktop.org/patch/msgid/20220521234104.88410-1-dossche.niels@gmail.com
drivers/gpu/drm/drm_encoder.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/drm_encoder.c
b/drivers/gpu/drm/drm_encoder.c
index 72e982323a5e5b02081a6ba396e421d06bc2c20d..a940024c808711a2ced024c4ff917f3b6ac2374a 100644
(file)
--- a/
drivers/gpu/drm/drm_encoder.c
+++ b/
drivers/gpu/drm/drm_encoder.c
@@
-226,7
+226,7
@@
void *__drmm_encoder_alloc(struct drm_device *dev, size_t size, size_t offset,
container = drmm_kzalloc(dev, size, GFP_KERNEL);
if (!container)
- return ERR_PTR(-E
INVAL
);
+ return ERR_PTR(-E
NOMEM
);
encoder = container + offset;