diff mbox

[15/19,media] uvc_video: Adjust one function call together with a variable assignment

Message ID 004f5e95-ac91-d643-d84b-a76e1da92577@users.sourceforge.net (mailing list archive)
State New, archived
Headers show

Commit Message

SF Markus Elfring Dec. 25, 2016, 6:47 p.m. UTC
From: Markus Elfring <elfring@users.sourceforge.net>
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@users.sourceforge.net>
---
 drivers/media/usb/uvc/uvc_video.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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);
-	}
 }
 
 /*