From: Olivier Sobrie Date: Fri, 30 Jan 2015 12:22:02 +0000 (+0100) Subject: hso: add missing cancel_work_sync in disconnect() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cc491970f5cef560b9e5bf037f0c9dd1e4d6a4bd;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index cb33fb4e9a80..e94a02395357 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c @@ -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);