HID: hiddev: Remove redundant check on unsigned variable
authorTushar Behera <tushar.behera@linaro.org>
Fri, 16 Nov 2012 06:50:43 +0000 (12:20 +0530)
committerJiri Kosina <jkosina@suse.cz>
Fri, 16 Nov 2012 09:26:23 +0000 (10:26 +0100)
No need to check whether unsigned variable is less than 0.

CC: Jiri Kosina <jkosina@suse.cz>
CC: linux-usb@vger.kernel.org
CC: linux-input@vger.kernel.org
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hiddev.c

index 14599e25679181cc00223675a7d4170cdff70174..711c9656ec0fa69d16dde39b0f806aa2d36202bf 100644 (file)
@@ -625,7 +625,7 @@ static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                break;
 
        case HIDIOCAPPLICATION:
-               if (arg < 0 || arg >= hid->maxapplication)
+               if (arg >= hid->maxapplication)
                        break;
 
                for (i = 0; i < hid->maxcollection; i++)