mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: kernel-janitors@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Arnd Bergmann <arnd@arndb.de>, Brent Casavant <bcasavan@sgi.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeremy Higdon <jeremy@sgi.com>, Pat Gefre <pfg@sgi.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 4/4] misc/ioc4: Adjust one function call together with a variable assignment
Date: Mon, 8 Jan 2018 17:19:10 +0100	[thread overview]
Message-ID: <f51d4d70-6c21-229e-fdc6-8c4032bb974d@users.sourceforge.net> (raw)
In-Reply-To: <4fb26753-2ae3-7c17-7777-03c6923a1d4b@users.sourceforge.net>

From: Markus Elfring <elfring@users.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@users.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

      parent reply	other threads:[~2018-01-08 16:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 16:10 [PATCH 0/4] misc-IOC4: Adjustments for ioc4_probe() SF Markus Elfring
2018-01-08 16:15 ` [PATCH 1/4] misc/ioc4: Return -ENOMEM after a failed kmalloc() in ioc4_probe() SF Markus Elfring
2018-01-08 16:16 ` [PATCH 2/4] misc/ioc4: Delete an error message for a failed memory allocation " SF Markus Elfring
2018-01-08 16:17 ` [PATCH 3/4] misc/ioc4: Improve a size determination " SF Markus Elfring
2018-01-08 16:19 ` 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=f51d4d70-6c21-229e-fdc6-8c4032bb974d@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bcasavan@sgi.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeremy@sgi.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pfg@sgi.com \
    /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

all inboxes | Powered by JetHome®