]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/udl: Fix missing error code in udl_handle_damage()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 13 Nov 2020 10:15:02 +0000 (13:15 +0300)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 13 Nov 2020 14:03:48 +0000 (15:03 +0100)
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
drivers/gpu/drm/udl/udl_modeset.c

index 42eeba1dfdbf31fa7bbcfd26a700224e7487beac..9d34ec9d03f630f3fed78da2e41f43b0c688ae9b 100644 (file)
@@ -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++) {