diff options
author | Colin Ian King <colin.king@canonical.com> | 2020-02-21 23:26:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-23 16:40:38 -0800 |
commit | 8e3a573517458a09fb0b702c2d04f3ec43f1b5c5 (patch) | |
tree | 147acd6597fc8de80afb2523da24d460198cba81 /drivers/net/ethernet/amazon | |
parent | fb0b1c60421f2fb8de2f2dfa628c7c1c3f034bcc (diff) |
net: ena: ethtool: remove redundant non-zero check on rc
The non-zero check on rc is redundant as a previous non-zero
check on rc will always return and the second check is never
reached, hence it is redundant and can be removed. Also
remove a blank line.
Addresses-Coverity: ("Logically dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amazon')
-rw-r--r-- | drivers/net/ethernet/amazon/ena/ena_ethtool.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amazon/ena/ena_ethtool.c b/drivers/net/ethernet/amazon/ena/ena_ethtool.c index ced1d577b62a..1e38930353f2 100644 --- a/drivers/net/ethernet/amazon/ena/ena_ethtool.c +++ b/drivers/net/ethernet/amazon/ena/ena_ethtool.c @@ -674,7 +674,6 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, * supports getting/setting the hash function. */ rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func, key); - if (rc) { if (rc == -EOPNOTSUPP) { key = NULL; @@ -685,9 +684,6 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, return rc; } - if (rc) - return rc; - switch (ena_func) { case ENA_ADMIN_TOEPLITZ: func = ETH_RSS_HASH_TOP; |