diff options
Diffstat (limited to 'net/bridge/br_notify.c')
-rw-r--r-- | net/bridge/br_notify.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_notify.c b/net/bridge/br_notify.c index 717e1fd..404d4e1 100644 --- a/net/bridge/br_notify.c +++ b/net/bridge/br_notify.c @@ -32,14 +32,15 @@ struct notifier_block br_device_notifier = { static int br_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct net_device *dev = ptr; - struct net_bridge_port *p = dev->br_port; + struct net_bridge_port *p = br_port_get(dev); struct net_bridge *br; int err; /* not a port of a bridge */ - if (p == NULL) + if (!br_port_exists(dev)) return NOTIFY_DONE; + p = br_port_get(dev); br = p->br; switch (event) { |