From 6920c566c1d4e18ac0ece6b25642f8b4b139cedf Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 4 Mar 2012 01:18:45 +0100 Subject: [PATCH] bridge: fix hotplug device removal --- bridge.c | 8 ++++---- 1 file 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; -- 2.25.1