hso: add missing cancel_work_sync in disconnect()
authorOlivier Sobrie <olivier@sobrie.be>
Fri, 30 Jan 2015 12:22:02 +0000 (13:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Feb 2015 20:33:27 +0000 (12:33 -0800)
For hso serial devices, two cancel_work_sync were missing in the
disconnect method.

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/hso.c

index cb33fb4..e94a023 100644 (file)
@@ -3106,6 +3106,8 @@ static void hso_free_interface(struct usb_interface *interface)
                        mutex_lock(&serial->parent->mutex);
                        serial->parent->usb_gone = 1;
                        mutex_unlock(&serial->parent->mutex);
+                       cancel_work_sync(&serial_table[i]->async_put_intf);
+                       cancel_work_sync(&serial_table[i]->async_get_intf);
                        hso_serial_tty_unregister(serial);
                        kref_put(&serial_table[i]->ref, hso_serial_ref_free);
                        set_serial_by_index(i, NULL);