staging/fwserial: Release port regardless of unplug response code
authorPeter Hurley <peter@hurleysoftware.com>
Tue, 29 Jan 2013 03:34:36 +0000 (22:34 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jan 2013 04:28:45 +0000 (23:28 -0500)
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>
drivers/staging/fwserial/fwserial.c

index 8db4b41d4f43618f2dbd8b48e44b944a669c6e38..e40b480d4dc23259dd0251e30bb313f416b3b564 100644 (file)
@@ -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);