From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kernel-janitors@vger.kernel.org,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Anton Vasilyev <vasilyev@ispras.ru>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Kosina <jkosina@suse.cz>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] misc/ibmasm: Adjust two function calls together with a variable assignment
Date: Mon, 8 Jan 2018 14:10:38 +0100 [thread overview]
Message-ID: <6123f351-5656-2955-5cf1-953dfac61c04@users.sourceforge.net> (raw)
In-Reply-To: <842e4179-dbac-cd43-e320-c5009d896a28@users.sourceforge.net>
From: Markus Elfring <elfring@users.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@users.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
prev parent reply other threads:[~2018-01-08 13:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 13:07 [PATCH 0/3] misc-IBM ASM SP: Adjustments for ibmasm_init_one() SF Markus Elfring
2018-01-08 13:08 ` [PATCH 1/3] misc/ibmasm: Delete an error message for a failed memory allocation in ibmasm_init_one() SF Markus Elfring
2018-01-08 13:09 ` [PATCH 2/3] misc/ibmasm: Improve a size determination " SF Markus Elfring
2018-01-08 13:10 ` SF Markus Elfring [this message]
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=6123f351-5656-2955-5cf1-953dfac61c04@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vasilyev@ispras.ru \
/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