[PATCH 02/11] staging/fwserial: Release port regardless of unplug response code

From: Peter Hurley
Date: Mon Jan 28 2013 - 22:37:21 EST


After sending the unplug response, release the port even if an
error occurred.

Signed-off-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/fwserial/fwserial.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index b1482ef..055085d 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -2675,10 +2675,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);
--
1.8.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/