Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139823
b: refs/heads/master
c: 3b7d2b3
h: refs/heads/master
i:
  139821: 01c1dbd
  139819: f0db146
  139815: d6c35d1
  139807: 273ccbb
v: v3
  • Loading branch information
Jan Dumon authored and David S. Miller committed Apr 2, 2009
1 parent c64d77a commit 368c72e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6bc978b361bb9da7526a78b0a247bdd34984282
refs/heads/master: 3b7d2b319db0ba1f6208ca58b297fb419301f85a
19 changes: 11 additions & 8 deletions trunk/drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Copyright (C) 2008 Option International
* Filip Aben <f.aben@option.com>
* Denis Joseph Barrow <d.barow@option.com>
* Jan Dumon <j.dumon@option.com>
* Copyright (C) 2007 Andrew Bird (Sphere Systems Ltd)
* <ajb@spheresystems.co.uk>
* Copyright (C) 2008 Greg Kroah-Hartman <gregkh@suse.de>
Expand Down Expand Up @@ -2417,20 +2418,22 @@ static void hso_free_net_device(struct hso_device *hso_dev)
if (!hso_net)
return;

remove_net_device(hso_net->parent);

if (hso_net->net) {
unregister_netdev(hso_net->net);
free_netdev(hso_net->net);
}

/* start freeing */
for (i = 0; i < MUX_BULK_RX_BUF_COUNT; i++) {
usb_free_urb(hso_net->mux_bulk_rx_urb_pool[i]);
kfree(hso_net->mux_bulk_rx_buf_pool[i]);
hso_net->mux_bulk_rx_buf_pool[i] = NULL;
}
usb_free_urb(hso_net->mux_bulk_tx_urb);
kfree(hso_net->mux_bulk_tx_buf);

remove_net_device(hso_net->parent);

if (hso_net->net) {
unregister_netdev(hso_net->net);
free_netdev(hso_net->net);
}
hso_net->mux_bulk_tx_buf = NULL;

kfree(hso_dev);
}
Expand Down Expand Up @@ -2620,12 +2623,12 @@ static void hso_free_tiomget(struct hso_serial *serial)
{
struct hso_tiocmget *tiocmget = serial->tiocmget;
if (tiocmget) {
kfree(tiocmget);
if (tiocmget->urb) {
usb_free_urb(tiocmget->urb);
tiocmget->urb = NULL;
}
serial->tiocmget = NULL;
kfree(tiocmget);

}
}
Expand Down

0 comments on commit 368c72e

Please sign in to comment.