[PATCH 4/4] misc/ioc4: Adjust one function call together with a variable assignment
From: SF Markus Elfring
Date: Mon Jan 08 2018 - 11:19:22 EST
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Jan 2018 16:43:21 +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/misc/ioc4.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/ioc4.c b/drivers/misc/ioc4.c
index 704e13382df0..8381dd9c7dd9 100644
--- a/drivers/misc/ioc4.c
+++ b/drivers/misc/ioc4.c
@@ -283,10 +283,11 @@ ioc4_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
struct ioc4_driver_data *idd;
struct ioc4_submodule *is;
uint32_t pcmd;
- int ret;
/* Enable IOC4 and take ownership of it */
- if ((ret = pci_enable_device(pdev))) {
+ int ret = pci_enable_device(pdev);
+
+ if (ret) {
printk(KERN_WARNING
"%s: Failed to enable IOC4 device for pci_dev %s.\n",
__func__, pci_name(pdev));
--
2.15.1