[PATCH 15/19] [media] uvc_video: Adjust one function call together with a variable assignment
From: SF Markus Elfring
Date: Sun Dec 25 2016 - 13:47:49 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Dec 2016 18:00:39 +0100
The script "checkpatch.pl" pointed information out like the following.
ERROR: do not use assignment in if condition
Thus fix the affected source code place.
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/media/usb/uvc/uvc_video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index b7fc1762c3da..0ed3453b1c75 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1350,10 +1350,10 @@ static void uvc_video_complete(struct urb *urb)
stream->decode(urb, stream, buf);
- if ((ret = usb_submit_urb(urb, GFP_ATOMIC)) < 0) {
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+ if (ret < 0)
uvc_printk(KERN_ERR, "Failed to resubmit video URB (%d).\n",
ret);
- }
}
/*
--
2.11.0