[PATCH] media: uvcvideo: drop useless assignment in uvc_parse_format()
Sergey Shtylyov <[email protected]>
| Newsgroups | org.kernel.vger.linux-media |
|---|---|
| Message-ID | <[email protected]> |
Close to the end of uvc_parse_format(), the parameter buflen is decremented (again) but that statement seems pointless as buflen isn't used afterwards. Drop the useless assignment (gcc doesn't generate any code for it anyways). Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Signed-off-by: Sergey Shtylyov <[email protected]> --- drivers/media/usb/uvc/uvc_driver.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index e289cc71ba98..0e78e8bcd320 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -520,7 +520,6 @@ static int uvc_parse_format(struct uvc_device *dev, format->xfer_func = uvc_xfer_func(buffer[4]); format->ycbcr_enc = uvc_ycbcr_enc(buffer[5]); - buflen -= buffer[0]; buffer += buffer[0]; } else { format->colorspace = V4L2_COLORSPACE_SRGB; -- 2.55.0