diff options
author | Likun Gao <Likun.Gao@amd.com> | 2020-10-30 12:23:20 +0800 |
---|---|---|
committer | Likun Gao <Likun.Gao@amd.com> | 2020-12-14 11:06:07 +0800 |
commit | 6234a1b2652f469071c0c9b0d8b0f4a8079efe74 (patch) | |
tree | f6a364352eef9f518264a4efec8c632f39698181 | |
parent | 6bd3dc6bd8af238868154f24a37ff13cc9aa2705 (diff) |
Fix drmmode_crtc_scanout_create logic
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.c | 3 |
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 |