Skip to content

Commit

Permalink
HID: hiddev: Remove redundant check on unsigned variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tushar Behera authored and Jiri Kosina committed Nov 16, 2012
1 parent 88c687b commit d339f61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/usbhid/hiddev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit d339f61

Please sign in to comment.