Message ID | 20210619220115.2830761-6-mkl@pengutronix.de |
---|---|
State | Accepted |
Commit | ab4a0b8fcb9a95c02909b62049811bd2e586aaa4 |
Headers | show |
Series | [net,1/5] can: bcm: delay release of struct bcm_op after synchronize_rcu() | expand |
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index 5af69787d9d5..0a37af4a3fa4 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -1053,7 +1053,6 @@ static void ems_usb_disconnect(struct usb_interface *intf) if (dev) { unregister_netdev(dev->netdev); - free_candev(dev->netdev); unlink_all_urbs(dev); @@ -1061,6 +1060,8 @@ static void ems_usb_disconnect(struct usb_interface *intf) kfree(dev->intr_in_buffer); kfree(dev->tx_msg_buffer); + + free_candev(dev->netdev); } }