atm: Cleanup redundant tests on unsigned
The variables are unsigned so the `< 0' test always fails, the other part of the test catches wrapped values. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
65a1c4fffa
commit
e0c5567d06
@@ -2739,7 +2739,7 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg)
|
||||
spin_lock_irqsave(&he_dev->global_lock, flags);
|
||||
switch (reg.type) {
|
||||
case HE_REGTYPE_PCI:
|
||||
if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) {
|
||||
if (reg.addr >= HE_REGMAP_SIZE) {
|
||||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user