aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/hso.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r--drivers/net/usb/hso.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index 387ca43f26f4..304fe78ff60e 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2421,10 +2421,8 @@ static void hso_free_net_device(struct hso_device *hso_dev)
2421 2421
2422 remove_net_device(hso_net->parent); 2422 remove_net_device(hso_net->parent);
2423 2423
2424 if (hso_net->net) { 2424 if (hso_net->net)
2425 unregister_netdev(hso_net->net); 2425 unregister_netdev(hso_net->net);
2426 free_netdev(hso_net->net);
2427 }
2428 2426
2429 /* start freeing */ 2427 /* start freeing */
2430 for (i = 0; i < MUX_BULK_RX_BUF_COUNT; i++) { 2428 for (i = 0; i < MUX_BULK_RX_BUF_COUNT; i++) {
@@ -2436,6 +2434,9 @@ static void hso_free_net_device(struct hso_device *hso_dev)
2436 kfree(hso_net->mux_bulk_tx_buf); 2434 kfree(hso_net->mux_bulk_tx_buf);
2437 hso_net->mux_bulk_tx_buf = NULL; 2435 hso_net->mux_bulk_tx_buf = NULL;
2438 2436
2437 if (hso_net->net)
2438 free_netdev(hso_net->net);
2439
2439 kfree(hso_dev); 2440 kfree(hso_dev);
2440} 2441}
2441 2442