igc: Fix igc_uc_unsync()
authorAndre Guedes <andre.guedes@intel.com>
Wed, 18 Mar 2020 23:00:54 +0000 (16:00 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 19 Apr 2020 18:52:40 +0000 (11:52 -0700)
In case igc_del_mac_filter() returns error, that error is masked
since the functions always return 0 (success). This patch fixes
igc_uc_unsync() so it returns whatever value igc_del_mac_filter()
returns (0 on success, negative number on error).

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c

index 7c060c731a7eb900056c28fb6ffb0067d78fd7f8..dc463242811715b533daa605bc1701ddf6fa8df6 100644 (file)
@@ -2284,9 +2284,7 @@ static int igc_uc_unsync(struct net_device *netdev, const unsigned char *addr)
 {
        struct igc_adapter *adapter = netdev_priv(netdev);
 
-       igc_del_mac_filter(adapter, addr, adapter->num_rx_queues, 0);
-
-       return 0;
+       return igc_del_mac_filter(adapter, addr, adapter->num_rx_queues, 0);
 }
 
 /**