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>
This commit is contained in:
parent
de321a14da
commit
c88d40b25f
@ -2684,10 +2684,9 @@ static void fwserial_handle_unplug_req(struct work_struct *work)
|
|||||||
|
|
||||||
spin_lock_bh(&peer->lock);
|
spin_lock_bh(&peer->lock);
|
||||||
if (peer->state == FWPS_UNPLUG_RESPONDING) {
|
if (peer->state == FWPS_UNPLUG_RESPONDING) {
|
||||||
if (rcode == RCODE_COMPLETE)
|
if (rcode != RCODE_COMPLETE)
|
||||||
port = peer_revert_state(peer);
|
|
||||||
else
|
|
||||||
fwtty_err(&peer->unit, "UNPLUG_RSP error (%d)", rcode);
|
fwtty_err(&peer->unit, "UNPLUG_RSP error (%d)", rcode);
|
||||||
|
port = peer_revert_state(peer);
|
||||||
}
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
spin_unlock_bh(&peer->lock);
|
spin_unlock_bh(&peer->lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user