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: <6123f351-5656-2955-5cf1-953dfac61c04@users.sourceforge.net>
Date:   Mon, 8 Jan 2018 14:10:38 +0100
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     kernel-janitors@...r.kernel.org,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Anton Vasilyev <vasilyev@...ras.ru>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Kosina <jkosina@...e.cz>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 3/3] misc/ibmasm: Adjust two function calls together with a
 variable assignment

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 8 Jan 2018 13:53:25 +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 places.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/misc/ibmasm/module.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index 894397b1ee51..f4742044e0d1 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -64,14 +64,16 @@ MODULE_PARM_DESC(ibmasm_debug, " Set debug mode on or off");
 
 static int ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-	int result;
 	struct service_processor *sp;
+	int result = pci_enable_device(pdev);
 
-	if ((result = pci_enable_device(pdev))) {
+	if (result) {
 		dev_err(&pdev->dev, "Failed to enable PCI device\n");
 		return result;
 	}
-	if ((result = pci_request_regions(pdev, DRIVER_NAME))) {
+
+	result = pci_request_regions(pdev, DRIVER_NAME);
+	if (result) {
 		dev_err(&pdev->dev, "Failed to allocate PCI resources\n");
 		goto error_resources;
 	}
-- 
2.15.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ