Skip to content

Commit c88d40b

Browse files
peterhurleygregkh
authored andcommitted
staging/fwserial: Release port regardless of unplug response code
After sending the unplug response, release the port even if an error occurred. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent de321a1 commit c88d40b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎drivers/staging/fwserial/fwserial.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2684,10 +2684,9 @@ static void fwserial_handle_unplug_req(struct work_struct *work)
26842684

26852685
spin_lock_bh(&peer->lock);
26862686
if (peer->state == FWPS_UNPLUG_RESPONDING) {
2687-
if (rcode == RCODE_COMPLETE)
2688-
port = peer_revert_state(peer);
2689-
else
2687+
if (rcode != RCODE_COMPLETE)
26902688
fwtty_err(&peer->unit, "UNPLUG_RSP error (%d)", rcode);
2689+
port = peer_revert_state(peer);
26912690
}
26922691
cleanup:
26932692
spin_unlock_bh(&peer->lock);

0 commit comments

Comments
 (0)