mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
ipvlan: Remove a useless comparison
Fix following gcc warning: drivers/net/ipvlan/ipvlan_main.c:543:12: warning: comparison is always false due to limited range of data type [-Wtype-limits] 'mode' is a u16 variable, IPVLAN_MODE_L2 is zero, the comparison is always false Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c1c8c27701
commit
b1dd054dbb
|
|
@ -540,7 +540,7 @@ static int ipvlan_nl_validate(struct nlattr *tb[], struct nlattr *data[],
|
|||
if (data[IFLA_IPVLAN_MODE]) {
|
||||
u16 mode = nla_get_u16(data[IFLA_IPVLAN_MODE]);
|
||||
|
||||
if (mode < IPVLAN_MODE_L2 || mode >= IPVLAN_MODE_MAX)
|
||||
if (mode >= IPVLAN_MODE_MAX)
|
||||
return -EINVAL;
|
||||
}
|
||||
if (data[IFLA_IPVLAN_FLAGS]) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user