Commit daf41ac2 authored by Oliver Neukum's avatar Oliver Neukum Committed by Mauro Carvalho Chehab

[media] uvcvideo: Simplify redundant check

x < constant implies x + unsigned < constant
That check just obfuscates the code
Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 79019190
......@@ -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);
......
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