Skip to content

Commit

Permalink
staging/fwserial: Release port regardless of unplug response code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Hurley authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent de321a1 commit c88d40b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/fwserial/fwserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2684,10 +2684,9 @@ static void fwserial_handle_unplug_req(struct work_struct *work)

spin_lock_bh(&peer->lock);
if (peer->state == FWPS_UNPLUG_RESPONDING) {
if (rcode == RCODE_COMPLETE)
port = peer_revert_state(peer);
else
if (rcode != RCODE_COMPLETE)
fwtty_err(&peer->unit, "UNPLUG_RSP error (%d)", rcode);
port = peer_revert_state(peer);
}
cleanup:
spin_unlock_bh(&peer->lock);
Expand Down

0 comments on commit c88d40b

Please sign in to comment.