diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-11-13 11:15:02 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-11-13 15:03:48 +0100 |
commit | a7319c8f50c5e93a12997e2d0821a2f7946fb734 (patch) | |
tree | 9e3f82e5ac01502a198c23661eaed87ba0c3afe1 /drivers | |
parent | drm/via/via_dma: Remove set but unused variable 'agp_base' (diff) | |
download | linux-a7319c8f50c5e93a12997e2d0821a2f7946fb734.tar.xz linux-a7319c8f50c5e93a12997e2d0821a2f7946fb734.zip |
drm/udl: Fix missing error code in udl_handle_damage()
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@oracle.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201113101502.GD168908@mwanda
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/udl/udl_modeset.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index 42eeba1dfdbf..9d34ec9d03f6 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -305,8 +305,10 @@ static int udl_handle_damage(struct drm_framebuffer *fb, int x, int y, vaddr = map.vaddr; /* TODO: Use mapping abstraction properly */ 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++) { |