summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/net/usb/usbnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/net/usb/usbnet.c')
-rw-r--r--kernel/drivers/net/usb/usbnet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/drivers/net/usb/usbnet.c b/kernel/drivers/net/usb/usbnet.c
index 0744bf2ef..c2ea4e566 100644
--- a/kernel/drivers/net/usb/usbnet.c
+++ b/kernel/drivers/net/usb/usbnet.c
@@ -1766,6 +1766,13 @@ out3:
if (info->unbind)
info->unbind (dev, udev);
out1:
+ /* subdrivers must undo all they did in bind() if they
+ * fail it, but we may fail later and a deferred kevent
+ * may trigger an error resubmitting itself and, worse,
+ * schedule a timer. So we kill it all just in case.
+ */
+ cancel_work_sync(&dev->kevent);
+ del_timer_sync(&dev->delay);
free_netdev(net);
out:
return status;