drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create()
commit 9ba85914c3 upstream.
radeon_user_framebuffer_create() misses to call drm_gem_object_put() in
an error path. Add the missed function call to fix it.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2674ffcad0
commit
7aa28f2f67
@@ -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 */
|
/* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */
|
||||||
if (obj->import_attach) {
|
if (obj->import_attach) {
|
||||||
DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n");
|
DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n");
|
||||||
|
drm_gem_object_put(obj);
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user