Commit 7b78a846 authored by Pedro Guilherme Siqueira Moreira's avatar Pedro Guilherme Siqueira Moreira Committed by Laurent Pinchart

media: uvcvideo: Fix assignment inside if condition

Fixes 'do not use assignment in if condition' errors issued by
scripts/checkpatch.pl on drivers/media/usb/uvc/uvc_driver.c
Signed-off-by: default avatarPedro Guilherme Siqueira Moreira <pedro.guilherme@espectro.eng.br>
Reviewed-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent 2a8c1952
......@@ -1144,7 +1144,8 @@ static int uvc_parse_control(struct uvc_device *dev)
buffer[1] != USB_DT_CS_INTERFACE)
goto next_descriptor;
if ((ret = uvc_parse_standard_control(dev, buffer, buflen)) < 0)
ret = uvc_parse_standard_control(dev, buffer, buflen);
if (ret < 0)
return ret;
next_descriptor:
......@@ -2180,7 +2181,8 @@ static int uvc_probe(struct usb_interface *intf,
usb_set_intfdata(intf, dev);
/* Initialize the interrupt URB. */
if ((ret = uvc_status_init(dev)) < 0) {
ret = uvc_status_init(dev);
if (ret < 0) {
dev_info(&dev->udev->dev,
"Unable to initialize the status endpoint (%d), status interrupt will not be supported.\n",
ret);
......
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