aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/amazon/ena/ena_ethtool.c
diff options
context:
space:
mode:
authorSameeh Jubran <sameehj@amazon.com>2020-05-03 09:52:15 +0000
committerDavid S. Miller <davem@davemloft.net>2020-05-03 15:59:30 -0700
commitcac7172f2d33ae75601d1bc928532d3ef7513db9 (patch)
treea08bb50141e9f5f546ba5040786610e04193def2 /drivers/net/ethernet/amazon/ena/ena_ethtool.c
parentnet: ena: changes to RSS hash key allocation (diff)
downloadlinux-dev-cac7172f2d33ae75601d1bc928532d3ef7513db9.tar.xz
linux-dev-cac7172f2d33ae75601d1bc928532d3ef7513db9.zip
net: ena: remove code that does nothing
Both key and func parameters are pointers on the stack. Setting them to NULL does nothing. The original intent was to leave the key and func unset in this case, but for this to happen nothing needs to be done as the calling function ethtool_get_rxfh() already clears key and func. This commit removes the above described useless code. Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com> Signed-off-by: Sameeh Jubran <sameehj@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amazon/ena/ena_ethtool.c')
-rw-r--r--drivers/net/ethernet/amazon/ena/ena_ethtool.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
index 0c3a2f14387e..c7df25f92dbd 100644
--- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c
+++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c
@@ -674,11 +674,8 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
*/
rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func);
if (rc) {
- if (rc == -EOPNOTSUPP) {
- key = NULL;
- hfunc = NULL;
+ if (rc == -EOPNOTSUPP)
rc = 0;
- }
return rc;
}