[PATCH 2/2] Properly handle drmModeAddFB failure in drmmode_crtc_scanout_allocate
Michel Dänzer
michel at daenzer.net
Tue Oct 13 02:59:30 PDT 2015
From: Michel Dänzer <michel.daenzer at amd.com>
We were printing an error message, but not propagating the failure. That
would probably lead to trouble down the road.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/drmmode_display.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f010919..4193be4 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -503,6 +503,9 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
bo_handle.u32, &scanout->fb_id);
if (ret) {
ErrorF("failed to add rotate fb\n");
+ amdgpu_bo_unref(&scanout->bo);
+ scanout->bo = NULL;
+ return NULL;
}
scanout->width = width;
--
2.6.0
More information about the xorg-driver-ati
mailing list