summaryrefslogtreecommitdiffstats
path: root/drivers/atm/he.c
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-10-23 06:09:55 +0000
committerDavid S. Miller <davem@davemloft.net>2009-10-29 01:39:55 -0700
commite0c5567d06ecf7777b6c46f4d933a0a6e09a44f3 (patch)
treee7ce3e8b2a082919d3f928fb7dad0d8eac8edcfd /drivers/atm/he.c
parent65a1c4fffaaf5ca166a1263d84ca664d5192cda6 (diff)
downloadop-kernel-dev-e0c5567d06ecf7777b6c46f4d933a0a6e09a44f3.zip
op-kernel-dev-e0c5567d06ecf7777b6c46f4d933a0a6e09a44f3.tar.gz
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>
Diffstat (limited to 'drivers/atm/he.c')
-rw-r--r--drivers/atm/he.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index 7066703..e906658 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -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;
}
OpenPOWER on IntegriCloud