Check in the right order to decide if the bridge have to be set up.
Additionally we are consistent with setting it down.
Signed-off-by: Emanuel Taube <emanuel.taube@gmail.com>
bm->present = true;
bst->n_present++;
+ if (bst->n_present == 1)
+ device_set_present(&bst->dev, true);
if (bst->dev.active)
bridge_enable_member(bm);
- else if (bst->n_present == 1)
- device_set_present(&bst->dev, true);
break;
case DEV_EVENT_REMOVE: