Commit 1193db2a authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller

net: simplify handling of dsa_ndo_eth_ioctl() return code

In the expression "x == 0 || x != -95", the term "x == 0" does not
change the expression's logical value, because 0 != -95, and so,
if x is 0, the expression would still be true by virtue of the second
term. If x is non-zero, the expression depends on the truth value of
the second term anyway. As such, the first term is redundant and can
be deleted.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00d521b3
......@@ -249,7 +249,7 @@ static int dev_eth_ioctl(struct net_device *dev,
int err;
err = dsa_ndo_eth_ioctl(dev, ifr, cmd);
if (err == 0 || err != -EOPNOTSUPP)
if (err != -EOPNOTSUPP)
return err;
if (ops->ndo_eth_ioctl) {
......
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