Commit 8e3a5735 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb0b1c60
...@@ -674,7 +674,6 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, ...@@ -674,7 +674,6 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
* supports getting/setting the hash function. * supports getting/setting the hash function.
*/ */
rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func, key); rc = ena_com_get_hash_function(adapter->ena_dev, &ena_func, key);
if (rc) { if (rc) {
if (rc == -EOPNOTSUPP) { if (rc == -EOPNOTSUPP) {
key = NULL; key = NULL;
...@@ -685,9 +684,6 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, ...@@ -685,9 +684,6 @@ static int ena_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key,
return rc; return rc;
} }
if (rc)
return rc;
switch (ena_func) { switch (ena_func) {
case ENA_ADMIN_TOEPLITZ: case ENA_ADMIN_TOEPLITZ:
func = ETH_RSS_HASH_TOP; func = ETH_RSS_HASH_TOP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment