lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f51d4d70-6c21-229e-fdc6-8c4032bb974d@users.sourceforge.net>
Date:   Mon, 8 Jan 2018 17:19:10 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     kernel-janitors@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Brent Casavant <bcasavan@....com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jeremy Higdon <jeremy@....com>, Pat Gefre <pfg@....com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 4/4] misc/ioc4: Adjust one function call together with a
 variable assignment

From: Markus Elfring <elfring@...rs.sourceforge.net>
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@...rs.sourceforge.net>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ