[PATCH] drm/radeon: Fix buffer ref leak in radeon_user_framebuffer_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit a294043b2fbd ("drm/radeon: Fail fb creation from imported
dma-bufs.") added a new error path after the buffer is looked up.
This needs to release the reference.

Fixes: a294043b2fbd ("drm/radeon: Fail fb creation from imported dma-bufs.")
Signed-off-by: Ben Hutchings <ben.hutchings at codethink.co.uk>
---
 drivers/gpu/drm/radeon/radeon_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index dfda5e0ed166..895b497385ef 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1344,6 +1344,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_unlocked(obj);
 		return ERR_PTR(-EINVAL);
 	}
 
-- 
2.16.2



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux