Commit db0cc143 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/dp/mst: Reduce nested ifs

Replace the nested ifs with a single if and a logical AND.

Cc: Lyude Paul <lyude@redhat.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190925141442.23236-1-ville.syrjala@linux.intel.comReviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 1ab2a99e
...@@ -1123,11 +1123,11 @@ static void drm_dp_mst_put_payload_id(struct drm_dp_mst_topology_mgr *mgr, ...@@ -1123,11 +1123,11 @@ static void drm_dp_mst_put_payload_id(struct drm_dp_mst_topology_mgr *mgr,
clear_bit(vcpi - 1, &mgr->vcpi_mask); clear_bit(vcpi - 1, &mgr->vcpi_mask);
for (i = 0; i < mgr->max_payloads; i++) { for (i = 0; i < mgr->max_payloads; i++) {
if (mgr->proposed_vcpis[i]) if (mgr->proposed_vcpis[i] &&
if (mgr->proposed_vcpis[i]->vcpi == vcpi) { mgr->proposed_vcpis[i]->vcpi == vcpi) {
mgr->proposed_vcpis[i] = NULL; mgr->proposed_vcpis[i] = NULL;
clear_bit(i + 1, &mgr->payload_mask); clear_bit(i + 1, &mgr->payload_mask);
} }
} }
mutex_unlock(&mgr->payload_lock); mutex_unlock(&mgr->payload_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment