From 7b78a8464d5701796a4e146b3973422350e56977 Mon Sep 17 00:00:00 2001 From: Pedro Guilherme Siqueira Moreira Date: Tue, 25 Oct 2022 02:04:49 -0300 Subject: [PATCH] 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: Pedro Guilherme Siqueira Moreira Reviewed-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- drivers/media/usb/uvc/uvc_driver.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 8f649fa9ab22..d84e46fdb1b9 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -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);