drm/edid: use else-if in CTA extension parsing
authorJani Nikula <jani.nikula@intel.com>
Mon, 9 May 2022 12:03:00 +0000 (15:03 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 13 May 2022 15:12:52 +0000 (18:12 +0300)
Only one of the conditions can be true.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3a7ba2217134b0ab4c4c72e4333231a4e0616e88.1652097712.git.jani.nikula@intel.com
drivers/gpu/drm/drm_edid.c

index 47d121e99201f8b44fc030a5b24a3cfb45e0c5c6..efc1999b95739fd417f93c772a237ebd58661350 100644 (file)
@@ -5473,16 +5473,16 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
 
                if (cea_db_is_hdmi_vsdb(db))
                        drm_parse_hdmi_vsdb_video(connector, data);
-               if (cea_db_is_hdmi_forum_vsdb(db) ||
-                   cea_db_is_hdmi_forum_scdb(db))
+               else if (cea_db_is_hdmi_forum_vsdb(db) ||
+                        cea_db_is_hdmi_forum_scdb(db))
                        drm_parse_hdmi_forum_scds(connector, data);
-               if (cea_db_is_microsoft_vsdb(db))
+               else if (cea_db_is_microsoft_vsdb(db))
                        drm_parse_microsoft_vsdb(connector, data);
-               if (cea_db_is_y420cmdb(db))
+               else if (cea_db_is_y420cmdb(db))
                        drm_parse_y420cmdb_bitmap(connector, data);
-               if (cea_db_is_vcdb(db))
+               else if (cea_db_is_vcdb(db))
                        drm_parse_vcdb(connector, data);
-               if (cea_db_is_hdmi_hdr_metadata_block(db))
+               else if (cea_db_is_hdmi_hdr_metadata_block(db))
                        drm_parse_hdr_metadata_block(connector, data);
        }
        cea_db_iter_end(&iter);