USB: sierra: remove disconnected test from close
authorJohan Hovold <jhovold@gmail.com>
Mon, 26 May 2014 17:23:02 +0000 (19:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 22:04:04 +0000 (15:04 -0700)
Remove no longer needed disconnected test from close, which is never
called post disconnect (and drivers must handle failed I/O during
disconnect anyway).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/sierra.c

index 854ac61581ba854f8225980ec77d178886f96ff6..74b417c91e302707ec97341b4ed6c2e5192b4bab 100644 (file)
@@ -772,16 +772,12 @@ static void sierra_close(struct usb_serial_port *port)
        portdata->rts_state = 0;
        portdata->dtr_state = 0;
 
-       mutex_lock(&serial->disc_mutex);
-       if (!serial->disconnected) {
-               /* odd error handling due to pm counters */
-               if (!usb_autopm_get_interface(serial->interface))
-                       sierra_send_setup(port);
-               else
-                       usb_autopm_get_interface_no_resume(serial->interface);
+       /* odd error handling due to pm counters */
+       if (!usb_autopm_get_interface(serial->interface))
+               sierra_send_setup(port);
+       else
+               usb_autopm_get_interface_no_resume(serial->interface);
 
-       }
-       mutex_unlock(&serial->disc_mutex);
        spin_lock_irq(&intfdata->susp_lock);
        portdata->opened = 0;
        if (--intfdata->open_ports == 0)