diff options
Diffstat (limited to 'net/dsa/switch.c')
-rw-r--r-- | net/dsa/switch.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 4ec5b7f85d51..09d9286b27cc 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c | |||
@@ -153,6 +153,9 @@ static void dsa_switch_mdb_add_bitmap(struct dsa_switch *ds, | |||
153 | { | 153 | { |
154 | int port; | 154 | int port; |
155 | 155 | ||
156 | if (!ds->ops->port_mdb_add) | ||
157 | return; | ||
158 | |||
156 | for_each_set_bit(port, bitmap, ds->num_ports) | 159 | for_each_set_bit(port, bitmap, ds->num_ports) |
157 | ds->ops->port_mdb_add(ds, port, mdb); | 160 | ds->ops->port_mdb_add(ds, port, mdb); |
158 | } | 161 | } |