aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-05-14 02:35:25 +0100
committerBen Hutchings <bhutchings@solarflare.com>2011-05-14 02:35:25 +0100
commit47a8467cc0907e2fd3e6f4d02465dfb64494133e (patch)
treebd0b4caa510658a6ed3e1eaacac31f0866b8641e /drivers/net/sfc
parent7be799a70ba3dd90a59e8d2c72bbe06020005b3f (diff)
sfc: Fix return value from efx_ethtool_set_rx_ntuple()
ethtool_ops::set_rx_ntuple is supposed to return 0 on success, but it currently returns the filter ID when it inserts or modifies a filter. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/ethtool.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index 8c5e0052c44..348437a8117 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -955,8 +955,9 @@ static int efx_ethtool_set_rx_ntuple(struct net_device *net_dev,
if (ntuple->fs.action == ETHTOOL_RXNTUPLE_ACTION_CLEAR)
return efx_filter_remove_filter(efx, &filter);
- else
- return efx_filter_insert_filter(efx, &filter, true);
+
+ rc = efx_filter_insert_filter(efx, &filter, true);
+ return rc < 0 ? rc : 0;
}
static int efx_ethtool_get_rxfh_indir(struct net_device *net_dev,