diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 142b294d34468508f80457a6e3b5ffc35c680f07..b0b9413fa5bf9c150c0339fe8ca97b581ba52c10 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -127,6 +127,9 @@ static void dsa_switch_mdb_add_bitmap(struct dsa_switch *ds, { int port; + if (!ds->ops->port_mdb_add) + return; + for_each_set_bit(port, bitmap, ds->num_ports) ds->ops->port_mdb_add(ds, port, mdb); }