]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/edid: Clean up errors in drm_edid.c
authorchenxuebing <chenxb_99091@126.com>
Thu, 11 Jan 2024 06:39:21 +0000 (06:39 +0000)
committerJani Nikula <jani.nikula@intel.com>
Thu, 11 Jan 2024 13:12:37 +0000 (15:12 +0200)
Fix the following errors reported by checkpatch:

ERROR: do not use assignment in if condition

Signed-off-by: chenxuebing <chenxb_99091@126.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240111063921.8701-1-chenxb_99091@126.com
drivers/gpu/drm/drm_edid.c

index e677dc8eb7a977e866e48f4f451267ee93ef5842..d45f86413402bed98600ce94964439fa8b58b6f2 100644 (file)
@@ -3610,7 +3610,8 @@ static bool mode_in_range(const struct drm_display_mode *mode,
        if (!mode_in_vsync_range(mode, edid, t))
                return false;
 
-       if ((max_clock = range_pixel_clock(edid, t)))
+       max_clock = range_pixel_clock(edid, t);
+       if (max_clock)
                if (mode->clock > max_clock)
                        return false;