Skip to content

Commit

Permalink
net: ena: remove code that does nothing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sameeh Jubran authored and David S. Miller committed May 3, 2020
1 parent 0af3c4e commit cac7172
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ethernet/amazon/ena/ena_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cac7172

Please sign in to comment.