patch-2.4.6 linux/drivers/net/wan/lapbether.c
Next file: linux/drivers/net/wan/lmc/lmc_main.c
Previous file: linux/drivers/net/wan/hdlc.c
Back to the patch index
Back to the overall index
- Lines: 30
- Date:
Wed Jun 27 17:10:55 2001
- Orig file:
v2.4.5/linux/drivers/net/wan/lapbether.c
- Orig date:
Wed Apr 18 14:40:07 2001
diff -u --recursive --new-file v2.4.5/linux/drivers/net/wan/lapbether.c linux/drivers/net/wan/lapbether.c
@@ -89,7 +89,7 @@
*/
static int lapbeth_check_devices(struct net_device *dev)
{
- struct lapbethdev *lapbeth, *lapbeth_prev;
+ struct lapbethdev *lapbeth, *lapbeth_prev, *lapbeth_next;
int result = 0;
unsigned long flags;
@@ -98,7 +98,8 @@
lapbeth_prev = NULL;
- for (lapbeth = lapbeth_devices; lapbeth != NULL; lapbeth = lapbeth->next) {
+ for (lapbeth = lapbeth_devices; lapbeth != NULL; lapbeth = lapbeth_next) {
+ lapbeth_next = lapbeth->next;
if (!dev_get(lapbeth->ethname)) {
if (lapbeth_prev)
lapbeth_prev->next = lapbeth->next;
@@ -112,8 +113,8 @@
dev_put(lapbeth->ethdev);
kfree(lapbeth);
}
-
- lapbeth_prev = lapbeth;
+ else
+ lapbeth_prev = lapbeth;
}
restore_flags(flags);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)