mirror of https://gitee.com/openkylin/linux.git
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190925141442.23236-1-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
parent
1ab2a99edb
commit
db0cc143b6
|
@ -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);
|
||||
|
||||
for (i = 0; i < mgr->max_payloads; i++) {
|
||||
if (mgr->proposed_vcpis[i])
|
||||
if (mgr->proposed_vcpis[i]->vcpi == vcpi) {
|
||||
mgr->proposed_vcpis[i] = NULL;
|
||||
clear_bit(i + 1, &mgr->payload_mask);
|
||||
}
|
||||
if (mgr->proposed_vcpis[i] &&
|
||||
mgr->proposed_vcpis[i]->vcpi == vcpi) {
|
||||
mgr->proposed_vcpis[i] = NULL;
|
||||
clear_bit(i + 1, &mgr->payload_mask);
|
||||
}
|
||||
}
|
||||
mutex_unlock(&mgr->payload_lock);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue