Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725683 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-09-03 16:10 +0200 |
| Last post | 2017-09-03 16:10 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/2] [media] Motion Eye: Adjustments for meye_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-03 16:10 +0200
[PATCH 2/2] [media] meye: Adjust two function calls together with a variable assignment SF Markus Elfring <elfring@users.sourceforge.net> - 2017-09-03 16:10 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-09-03 16:10 +0200 |
| Subject | [PATCH 0/2] [media] Motion Eye: Adjustments for meye_probe() |
| Message-ID | <ulDL3-VM-3@gated-at.bofh.it> |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Sun, 3 Sep 2017 15:54:45 +0200 Two update suggestions were taken into account from static source code analysis. Markus Elfring (2): Delete three error messages for a failed memory allocation Adjust two function calls together with a variable assignment drivers/media/pci/meye/meye.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) -- 2.14.1
[toc] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-09-03 16:10 +0200 |
| Subject | [PATCH 2/2] [media] meye: Adjust two function calls together with a variable assignment |
| Message-ID | <ulDL4-VM-11@gated-at.bofh.it> |
| In reply to | #1725683 |
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 3 Sep 2017 15:41:53 +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/pci/meye/meye.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index db36040770a6..9b69a07c1d5b 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -1642,14 +1642,15 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
meye.vdev = meye_template;
meye.vdev.v4l2_dev = &meye.v4l2_dev;
- ret = -EIO;
- if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
+ ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1);
+ if (ret) {
v4l2_err(v4l2_dev, "meye: unable to power on the camera\n");
v4l2_err(v4l2_dev, "meye: did you enable the camera in sonypi using the module options ?\n");
goto outsonypienable;
}
- if ((ret = pci_enable_device(meye.mchip_dev))) {
+ ret = pci_enable_device(meye.mchip_dev);
+ if (ret) {
v4l2_err(v4l2_dev, "meye: pci_enable_device failed\n");
goto outenabledev;
}
--
2.14.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web