drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
authorjsg <jsg@openbsd.org>
Mon, 19 Jul 2021 10:39:54 +0000 (10:39 +0000)
committerjsg <jsg@openbsd.org>
Mon, 19 Jul 2021 10:39:54 +0000 (10:39 +0000)
From Jing Xiangfeng
7aa28f2f67421d7ba9957275bc211a7782238f31 in linux 5.10.y/5.10.51
9ba85914c36c8fed9bf3e8b69c0782908c1247b7 in mainline linux

sys/dev/pci/drm/radeon/radeon_display.c

index d9d9de3..411272c 100644 (file)
@@ -1334,6 +1334,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,
        /* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */
        if (obj->import_attach) {
                DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n");
+               drm_gem_object_put(obj);
                return ERR_PTR(-EINVAL);
        }