aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvc_driver.c
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.de>2014-01-23 07:28:24 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-28 13:20:37 -0300
commitdaf41ac2c4b5b2e663079ccc58b8d6a70a3c111b (patch)
tree127ab56eaf7ac6d0f263d865f2514b2d100a3d0c /drivers/media/usb/uvc/uvc_driver.c
parent79019190a4c3a082c739cf7cc73a040c48b333bb (diff)
[media] uvcvideo: Simplify redundant check
x < constant implies x + unsigned < constant That check just obfuscates the code Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_driver.c')
-rw-r--r--drivers/media/usb/uvc/uvc_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index c3bb2502225b..b6cac17c238e 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -925,7 +925,7 @@ static int uvc_parse_standard_control(struct uvc_device *dev,
case UVC_VC_HEADER:
n = buflen >= 12 ? buffer[11] : 0;
- if (buflen < 12 || buflen < 12 + n) {
+ if (buflen < 12 + n) {
uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol "
"interface %d HEADER error\n", udev->devnum,
alts->desc.bInterfaceNumber);

Privacy Policy