diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index ff2a40496e4e..c9f4552c018b 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1269,7 +1269,6 @@ int igc_add_filter(struct igc_adapter *adapter, struct igc_nfc_filter *input) err = igc_add_mac_steering_filter(adapter, input->filter.dst_addr, input->action, 0); - err = min_t(int, err, 0); if (err) return err; } @@ -1279,7 +1278,6 @@ int igc_add_filter(struct igc_adapter *adapter, struct igc_nfc_filter *input) input->filter.src_addr, input->action, IGC_MAC_STATE_SRC_ADDR); - err = min_t(int, err, 0); if (err) return err; } diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 66b3a689bb05..7c060c731a7e 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2217,7 +2217,7 @@ static int igc_add_mac_filter(struct igc_adapter *adapter, const u8 *addr, adapter->mac_table[i].state |= IGC_MAC_STATE_IN_USE | flags; igc_rar_set_index(adapter, i); - return i; + return 0; } return -ENOSPC; @@ -2276,11 +2276,8 @@ static int igc_del_mac_filter(struct igc_adapter *adapter, const u8 *addr, static int igc_uc_sync(struct net_device *netdev, const unsigned char *addr) { struct igc_adapter *adapter = netdev_priv(netdev); - int ret; - ret = igc_add_mac_filter(adapter, addr, adapter->num_rx_queues, 0); - - return min_t(int, ret, 0); + return igc_add_mac_filter(adapter, addr, adapter->num_rx_queues, 0); } static int igc_uc_unsync(struct net_device *netdev, const unsigned char *addr)