summaryrefslogtreecommitdiffhomepage
path: root/bridge.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-04 01:18:45 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-03-04 01:18:45 +0100
commit6920c566c1d4e18ac0ece6b25642f8b4b139cedf (patch)
treee5827dbd060db8d60c7e9c01fe4d6b64a8c41ad6 /bridge.c
parente8ae4f0fb1470af28fe10fb6dbcd27ce97ea7f03 (diff)
bridge: fix hotplug device removal
Diffstat (limited to 'bridge.c')
-rw-r--r--bridge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bridge.c b/bridge.c
index f2c73b0..dbfd470 100644
--- a/bridge.c
+++ b/bridge.c
@@ -156,12 +156,12 @@ bridge_member_cb(struct device_user *dev, enum device_event ev)
break;
case DEV_EVENT_REMOVE:
- if (!bm->present)
+ if (dev->hotplug) {
+ vlist_delete(&bst->members, &bm->node);
return;
+ }
- if (dev->hotplug)
- vlist_delete(&bst->members, &bm->node);
- else
+ if (bm->present)
bridge_remove_member(bm);
break;