[04/12] igc: Fix igc_uc_unsync()
diff mbox series

Message ID 20200318230102.36952-5-andre.guedes@intel.com
State Under Review
Delegated to: Jeff Kirsher
Headers show
Series
  • igc: Refactor MAC address filtering code
Related show

Commit Message

Andre Guedes March 18, 2020, 11 p.m. UTC
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>
---
 drivers/net/ethernet/intel/igc/igc_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Brown, Aaron F March 31, 2020, 7:59 p.m. UTC | #1
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Andre Guedes
> Sent: Wednesday, March 18, 2020 4:01 PM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH 04/12] igc: Fix igc_uc_unsync()
> 
> 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>
> ---
>  drivers/net/ethernet/intel/igc/igc_main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@intel.com>

Patch
diff mbox series

diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index ed2648e0fbd8..cc1e1b0286b3 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -2285,9 +2285,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);
 }
 
 /**