diff options
author | Niels Dossche <dossche.niels@gmail.com> | 2022-05-22 02:41:04 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2022-05-25 18:39:49 +0300 |
commit | b981cc333ff06cb23c7968007965e79c80f5df97 (patch) | |
tree | d26687e4473422fa23edf7697762da7bee5d6e61 /drivers/gpu/drm/drm_encoder.c | |
parent | a67664860f7833015a683ea295f7c79ac2901332 (diff) | |
download | linux-b981cc333ff06cb23c7968007965e79c80f5df97.tar.xz |
drm: use ENOMEM for drmm_kzalloc allocation failures
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
Diffstat (limited to 'drivers/gpu/drm/drm_encoder.c')
-rw-r--r-- | drivers/gpu/drm/drm_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_encoder.c b/drivers/gpu/drm/drm_encoder.c index 72e982323a5e..a940024c8087 100644 --- 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(-EINVAL); + return ERR_PTR(-ENOMEM); encoder = container + offset; |