[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201228125026.226024488@linuxfoundation.org>
Date: Mon, 28 Dec 2020 13:41:48 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 110/717] drm/udl: Fix missing error code in udl_handle_damage()
From: Dan Carpenter <dan.carpenter@...cle.com>
[ Upstream commit a7319c8f50c5e93a12997e2d0821a2f7946fb734 ]
If udl_get_urb() fails then this should return a negative error code
but currently it returns success.
Fixes: 798ce3fe1c3a ("drm/udl: Begin/end access to imported buffers in damage-handler")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@...e.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201113101502.GD168908@mwanda
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/udl/udl_modeset.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
index fef43f4e3bac4..edcfd8c120c44 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -303,8 +303,10 @@ static int udl_handle_damage(struct drm_framebuffer *fb, int x, int y,
}
urb = udl_get_urb(dev);
- if (!urb)
+ if (!urb) {
+ ret = -ENOMEM;
goto out_drm_gem_shmem_vunmap;
+ }
cmd = urb->transfer_buffer;
for (i = clip.y1; i < clip.y2; i++) {
--
2.27.0
Powered by blists - more mailing lists