summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb/mcba_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/can/usb/mcba_usb.c')
-rw-r--r--drivers/net/can/usb/mcba_usb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c
index 19a702ac49e4..21faa2ec4632 100644
--- a/drivers/net/can/usb/mcba_usb.c
+++ b/drivers/net/can/usb/mcba_usb.c
@@ -876,9 +876,8 @@ static void mcba_usb_disconnect(struct usb_interface *intf)
netdev_info(priv->netdev, "device disconnected\n");
unregister_candev(priv->netdev);
- free_candev(priv->netdev);
-
mcba_urb_unlink(priv);
+ free_candev(priv->netdev);
}
static struct usb_driver mcba_usb_driver = {