Skip to content

Commit b559b68

Browse files
committed
drm/dp_mst: Simplify error path in drm_dp_mst_handle_down_rep()
Simplify the error return path in drm_dp_mst_handle_down_rep(), preparing for the next patch. While at it use reset_msg_rx_state() instead of open-coding it. Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203160223.2926014-4-imre.deak@intel.com
1 parent 4d49e77 commit b559b68

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4013,20 +4013,15 @@ static int drm_dp_mst_handle_down_rep(struct drm_dp_mst_topology_mgr *mgr)
40134013
txmsg->reply.u.nak.nak_data);
40144014
}
40154015

4016-
memset(msg, 0, sizeof(struct drm_dp_sideband_msg_rx));
4017-
drm_dp_mst_topology_put_mstb(mstb);
4018-
40194016
mutex_lock(&mgr->qlock);
40204017
txmsg->state = DRM_DP_SIDEBAND_TX_RX;
40214018
list_del(&txmsg->next);
40224019
mutex_unlock(&mgr->qlock);
40234020

40244021
wake_up_all(&mgr->tx_waitq);
40254022

4026-
return 0;
4027-
40284023
out_clear_reply:
4029-
memset(msg, 0, sizeof(struct drm_dp_sideband_msg_rx));
4024+
reset_msg_rx_state(msg);
40304025
out:
40314026
if (mstb)
40324027
drm_dp_mst_topology_put_mstb(mstb);

0 commit comments

Comments
 (0)