From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-media@vger.kernel.org,
Arvind Yadav <arvind.yadav.cs@gmail.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Shyam Saini <mayhs11saini@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/4] [media] cpia2: Adjust two function calls together with a variable assignment
Date: Sun, 17 Sep 2017 15:32:56 +0200 [thread overview]
Message-ID: <b7bd5189-926c-b48c-37af-5d764c0674ec@users.sourceforge.net> (raw)
In-Reply-To: <c2ff478e-94d7-6c92-f467-69f5b66b8a1e@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 17 Sep 2017 12:56:50 +0200
The script "checkpatch.pl" pointed information out like the following.
ERROR: do not use assignment in if condition
Thus fix the affected source code places.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/media/usb/cpia2/cpia2_usb.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c
index c6be2786a66f..161c9b827f8e 100644
--- a/drivers/media/usb/cpia2/cpia2_usb.c
+++ b/drivers/media/usb/cpia2/cpia2_usb.c
@@ -367,7 +367,8 @@ static void cpia2_usb_complete(struct urb *urb)
if(cam->streaming) {
/* resubmit */
urb->dev = cam->dev;
- if ((i = usb_submit_urb(urb, GFP_ATOMIC)) != 0)
+ i = usb_submit_urb(urb, GFP_ATOMIC);
+ if (i != 0)
ERR("%s: usb_submit_urb ret %d!\n", __func__, i);
}
}
@@ -852,5 +853,5 @@ static int cpia2_usb_probe(struct usb_interface *intf,
}
-
- if((ret = cpia2_init_camera(cam)) < 0) {
+ ret = cpia2_init_camera(cam);
+ if (ret < 0) {
ERR("%s: failed to initialize cpia2 camera (ret = %d)\n", __func__, ret);
--
2.14.1
next prev parent reply other threads:[~2017-09-17 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 13:30 [PATCH 0/4] [media] CPia2: Fine-tuning for four function implementations SF Markus Elfring
2017-09-17 13:31 ` [PATCH 1/4] [media] cpia2: Use common error handling code in cpia2_usb_probe() SF Markus Elfring
2017-09-17 13:32 ` SF Markus Elfring [this message]
2017-09-17 13:34 ` [PATCH 3/4] [media] cpia2: Delete unnecessary null pointer checks in free_sbufs() SF Markus Elfring
2017-09-17 13:35 ` [PATCH 4/4] [media] cpia2: Delete an unnecessary return statement in process_frame() SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7bd5189-926c-b48c-37af-5d764c0674ec@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=arvind.yadav.cs@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mayhs11saini@gmail.com \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome