summaryrefslogtreecommitdiff
path: root/drivers/net/vmxnet3
diff options
context:
space:
mode:
authoryuehaibing <yuehaibing@huawei.com>2020-01-08 17:08:22 +0300
committerDavid S. Miller <davem@davemloft.net>2020-01-09 03:07:21 +0300
commit4a4a52d49d11f5c4a0df8b9806c8c5563801f753 (patch)
tree6012452e10259a92487d1df8861ee11e286ad7be /drivers/net/vmxnet3
parentea217e874aef6aa523331a9b5a8d49223460cf3e (diff)
downloadlinux-4a4a52d49d11f5c4a0df8b9806c8c5563801f753.tar.xz
vmxnet3: Remove always false conditional statement
param->rx_mini_pending is __u32 variable, it will never be less than zero. Signed-off-by: yuehaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_ethtool.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 0a38c76688ab..1e4b9ba70983 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -555,10 +555,8 @@ vmxnet3_set_ringparam(struct net_device *netdev,
}
if (VMXNET3_VERSION_GE_3(adapter)) {
- if (param->rx_mini_pending < 0 ||
- param->rx_mini_pending > VMXNET3_RXDATA_DESC_MAX_SIZE) {
+ if (param->rx_mini_pending > VMXNET3_RXDATA_DESC_MAX_SIZE)
return -EINVAL;
- }
} else if (param->rx_mini_pending != 0) {
return -EINVAL;
}