Commit e0c5567d authored by roel kluin's avatar roel kluin Committed by David S. Miller

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 65a1c4ff
...@@ -2906,8 +2906,8 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page) ...@@ -2906,8 +2906,8 @@ fore200e_proc_read(struct atm_dev *dev, loff_t* pos, char* page)
u32 media_index = FORE200E_MEDIA_INDEX(fore200e->bus->read(&fore200e->cp_queues->media_type)); u32 media_index = FORE200E_MEDIA_INDEX(fore200e->bus->read(&fore200e->cp_queues->media_type));
u32 oc3_index; u32 oc3_index;
if ((media_index < 0) || (media_index > 4)) if (media_index > 4)
media_index = 5; media_index = 5;
switch (fore200e->loop_mode) { switch (fore200e->loop_mode) {
case ATM_LM_NONE: oc3_index = 0; case ATM_LM_NONE: oc3_index = 0;
......
...@@ -2739,7 +2739,7 @@ he_ioctl(struct atm_dev *atm_dev, unsigned int cmd, void __user *arg) ...@@ -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); spin_lock_irqsave(&he_dev->global_lock, flags);
switch (reg.type) { switch (reg.type) {
case HE_REGTYPE_PCI: case HE_REGTYPE_PCI:
if (reg.addr < 0 || reg.addr >= HE_REGMAP_SIZE) { if (reg.addr >= HE_REGMAP_SIZE) {
err = -EINVAL; err = -EINVAL;
break; break;
} }
......
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