drm: xlnx: zynqmp_dpsub: Fix compilation error
authorAnatoliy Klymenko <anatoliy.klymenko@amd.com>
Fri, 26 Apr 2024 19:27:57 +0000 (12:27 -0700)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 8 May 2024 10:57:04 +0000 (12:57 +0200)
Fix W=1 clang 19 compilation error in zynqmp_disp_layer_drm_formats().

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404260946.4oZXvHD2-lkp@intel.com/
Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Fixes: b0f0469ab662 ("drm: xlnx: zynqmp_dpsub: Anounce supported input formats")
Link: https://patchwork.freedesktop.org/patch/msgid/20240426-dp-live-fmt-fix-v3-2-e904b5ae51d7@amd.com
(cherry picked from commit c72211751870ffa2cff5d91834059456cfa7cbd5)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
drivers/gpu/drm/xlnx/zynqmp_disp.c

index 423f5f4943ccf849b545f7db17238761f7ca17f1..c9fb432d4cbd29c03b1491108dd7604ca29cd09a 100644 (file)
@@ -981,7 +981,7 @@ u32 *zynqmp_disp_layer_drm_formats(struct zynqmp_disp_layer *layer,
        unsigned int i;
        u32 *formats;
 
-       if (WARN_ON(!layer->mode == ZYNQMP_DPSUB_LAYER_NONLIVE)) {
+       if (WARN_ON(layer->mode != ZYNQMP_DPSUB_LAYER_NONLIVE)) {
                *num_formats = 0;
                return NULL;
        }