diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-01-28 22:34:36 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-29 23:28:45 -0500 |
commit | c88d40b25ffc8099aa7a28f62dce85bee66b1892 (patch) | |
tree | b092e85c12258c4df98b3b945dea5061f59d82a6 /drivers/staging/fwserial | |
parent | de321a14da65a534da89a80dde949d0c6ff6316f (diff) |
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>
Diffstat (limited to 'drivers/staging/fwserial')
-rw-r--r-- | drivers/staging/fwserial/fwserial.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c index 8db4b41d4f4..e40b480d4dc 100644 --- a/drivers/staging/fwserial/fwserial.c +++ b/drivers/staging/fwserial/fwserial.c @@ -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); |