SDL: kmsdrm: Fix wrong check on KMSDRM_CreateWindow. (af54c)

From af54c82138bbb6823f6a77d94710c871ccb1309d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Henrique?= <[EMAIL REDACTED]>
Date: Fri, 23 Dec 2022 09:52:45 -0300
Subject: [PATCH] kmsdrm: Fix wrong check on KMSDRM_CreateWindow.

A previous cleanup commit inverted a statement that checked the return value of
a KMSDRM_CreateSurfaces call during KMSDRM_CreateWindow, which causes the video
backend to always fail despite success.

This commit restores the intended behavior.

Fixes: 3c501b963dd8 ("Clang-Tidy fixes (#6725)").
(cherry picked from commit 0187209f461b84d22fc49a03369506e06448f47f)
---
 src/video/kmsdrm/SDL_kmsdrmvideo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index d98252f04dda..38eaf596699f 100644
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c
@@ -1492,7 +1492,7 @@ int KMSDRM_CreateWindow(_THIS, SDL_Window *window)
         /* Create the window surfaces with the size we have just chosen.
            Needs the window diverdata in place. */
         ret = KMSDRM_CreateSurfaces(_this, window);
-        if (ret == 0) {
+        if (ret != 0) {
             return SDL_SetError("Can't window GBM/EGL surfaces on window creation.");
         }
     } /* NON-Vulkan block ends. */