fix initial bridge member bringup
authorFelix Fietkau <nbd@openwrt.org>
Fri, 21 Oct 2011 01:12:19 +0000 (03:12 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 21 Oct 2011 01:12:19 +0000 (03:12 +0200)
bridge.c

index 1b9e6bd8d1083f7d4b7dc590883671f3078f8a79..70ea0f03b0f9a97618ebdfdbb4d553769d57d072 100644 (file)
--- a/bridge.c
+++ b/bridge.c
@@ -224,11 +224,11 @@ bridge_create_member(struct bridge_state *bst, struct device *dev, bool hotplug)
        bm = calloc(1, sizeof(*bm));
        bm->bst = bst;
        bm->dev.cb = bridge_member_cb;
-       device_add_user(&bm->dev, dev);
        bm->dev.hotplug = hotplug;
-
        list_add_tail(&bm->list, &bst->members);
 
+       device_add_user(&bm->dev, dev);
+
        return bm;
 }