diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-10-09 18:38:47 +0900 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2015-10-14 11:00:45 +0900 |
commit | 21e72fb2418b5cc7fc849a9cf951186e209036b0 (patch) | |
tree | b26e67880b832587408390a629a26f00cef0043d /src | |
parent | 8da1d0c870e1081d77925807d6e3bbc61a23f54f (diff) |
Properly handle drmModeAddFB failure in drmmode_crtc_scanout_allocate
We were printing an error message, but not propagating the failure. That
would probably lead to trouble down the road.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drmmode_display.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |