hso: add missing cancel_work_sync in disconnect()

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>
This commit is contained in:
Olivier Sobrie 2015-01-30 13:22:02 +01:00 committed by David S. Miller
parent 301d3b7e10
commit cc491970f5
1 changed files with 2 additions and 0 deletions

View File

@ -3106,6 +3106,8 @@ static void hso_free_interface(struct usb_interface *interface)
mutex_lock(&serial->parent->mutex); mutex_lock(&serial->parent->mutex);
serial->parent->usb_gone = 1; serial->parent->usb_gone = 1;
mutex_unlock(&serial->parent->mutex); 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); hso_serial_tty_unregister(serial);
kref_put(&serial_table[i]->ref, hso_serial_ref_free); kref_put(&serial_table[i]->ref, hso_serial_ref_free);
set_serial_by_index(i, NULL); set_serial_by_index(i, NULL);