summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2020-10-30 12:23:20 +0800
committerLikun Gao <Likun.Gao@amd.com>2020-12-14 11:06:07 +0800
commit6234a1b2652f469071c0c9b0d8b0f4a8079efe74 (patch)
treef6a364352eef9f518264a4efec8c632f39698181
parent6bd3dc6bd8af238868154f24a37ff13cc9aa2705 (diff)
Fix drmmode_crtc_scanout_create logicHEADmaster
If crtc scanout create successfully, the function of drmmode_crtc_scanout_create should return TURE. This will fix the regression caused by commit: "Make drmmode_crtc_scanout_create/destroy static" (442efe73), as it will result to some function (such as drmmode_set_scanout_pixmap) go to wrong code path and result to NULL pointer. Fixes: 442efe73 ("Make drmmode_crtc_scanout_create/destroy static") Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-rw-r--r--src/drmmode_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f74106e..465915f 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -513,9 +513,10 @@ drmmode_crtc_scanout_create(xf86CrtcPtr crtc, PixmapPtr *scanout,
ErrorF("failed to create CRTC scanout FB\n");
error:
drmmode_crtc_scanout_destroy(scanout);
+ return FALSE;
}
- return FALSE;
+ return TRUE;
}
static void