rocker: handle non-bridge master change
authorSimon Horman <simon.horman@netronome.com>
Tue, 24 Mar 2015 00:31:40 +0000 (09:31 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2015 18:52:42 +0000 (14:52 -0400)
commita6e95cc718c8916a13f1e1e9d33cacbc5db56c0f
treecff8be6cf13c3e7490bf752fde8f2f01eef32f5b
parentd079535d5e1bf5e2e7c856bae2483414ea21e137
rocker: handle non-bridge master change

Master change notifications may occur other than when joining or
leaving a bridge, for example when being added to or removed from
a bond or Open vSwitch.

Previously in those cases rocker_port_bridge_leave() was called
which results in a null-pointer dereference as rocker_port->bridge_dev
is NULL because there is no bridge device.

This patch makes provision for doing nothing in such cases.

Fixes: 6c7079450071f ("rocker: implement L2 bridge offloading")
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c