net: stmmac: Fix VLAN filtering when HW does not support it
authorJose Abreu <Jose.Abreu@synopsys.com>
Wed, 1 Apr 2020 17:29:03 +0000 (19:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Apr 2020 18:25:03 +0000 (11:25 -0700)
commitdd6a4998e64a7806b54c3eba1e5e7bf6c81ccf8c
treedcd32e9f4a3460c8f890ce5529760680b5a5f7f5
parentcc213f8c47fbd4eeb6c3a4fa9b8c20d14f8bc8f4
net: stmmac: Fix VLAN filtering when HW does not support it

If we don't have any filters available we can't rely upon the return
code of stmmac_add_hw_vlan_rx_fltr() / stmmac_del_hw_vlan_rx_fltr(). Add
a check for this.

Fixes: ed64639bc1e0 ("net: stmmac: Add support for VLAN Rx filtering")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c