aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/mvpp2
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-05-29 10:59:06 +0800
committerDavid S. Miller <davem@davemloft.net>2019-05-30 11:46:59 -0700
commit5080e28d94a27e182e323854a9ba2a0718e9e3bf (patch)
tree31d04de248400d75fab58b6ae1e7cadebbfb35eb /drivers/net/ethernet/marvell/mvpp2
parentnet: stmmac: Switch to devm_alloc_etherdev_mqs (diff)
downloadlinux-dev-5080e28d94a27e182e323854a9ba2a0718e9e3bf.tar.xz
linux-dev-5080e28d94a27e182e323854a9ba2a0718e9e3bf.zip
net: mvpp2: cls: Remove unnessesary check in mvpp2_ethtool_cls_rule_ins
Fix smatch warning: drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c:1236 mvpp2_ethtool_cls_rule_ins() warn: unsigned 'info->fs.location' is never less than zero. 'info->fs.location' is u32 type, never less than zero. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvpp2')
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
index bd19a910dc90..e1c90adb2982 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
@@ -1300,8 +1300,7 @@ int mvpp2_ethtool_cls_rule_ins(struct mvpp2_port *port,
struct mvpp2_ethtool_fs *efs, *old_efs;
int ret = 0;
- if (info->fs.location >= MVPP2_N_RFS_ENTRIES_PER_FLOW ||
- info->fs.location < 0)
+ if (info->fs.location >= MVPP2_N_RFS_ENTRIES_PER_FLOW)
return -EINVAL;
efs = kzalloc(sizeof(*efs), GFP_KERNEL);