Skip to content

Commit c637aab

Browse files
Ahmed S. Darwishmarckleinebudde
authored andcommitted
can: kvaser_usb: Use can-dev unregistration mechanism
Use can-dev's unregister_candev() instead of directly calling networking unregister_netdev(). While both are functionally equivalent, unregister_candev() might do extra stuff in the future than just calling networking layer unregistration code. Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 2b290bb commit c637aab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/can/usb/kvaser_usb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ static void kvaser_usb_remove_interfaces(struct kvaser_usb *dev)
18561856
if (!dev->nets[i])
18571857
continue;
18581858

1859-
unregister_netdev(dev->nets[i]->netdev);
1859+
unregister_candev(dev->nets[i]->netdev);
18601860
}
18611861

18621862
kvaser_usb_unlink_all_urbs(dev);

0 commit comments

Comments
 (0)