linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: kbuild-all@01.org, Ulf Hansson <ulf.hansson@linaro.org>,
	Peter Guo <peter.guo@bayhubtech.com>,
	linux-mmc@vger.kernel.org
Subject: [PATCH] mmc: sdhci-pci: fix simple_return.cocci warnings
Date: Tue, 6 Oct 2015 04:01:04 +0800	[thread overview]
Message-ID: <20151005200104.GA98459@xian> (raw)
In-Reply-To: <1444073478.2730.308.camel@decadent.org.uk>

drivers/mmc/host/sdhci-pci-core.c:447:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.

Generated by: scripts/coccinelle/misc/simple_return.cocci

CC: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 sdhci-pci-core.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -444,11 +444,7 @@ static int jmicron_pmos(struct sdhci_pci
 	else
 		scratch &= ~0x47;
 
-	ret = pci_write_config_byte(chip->pdev, 0xAE, scratch);
-	if (ret)
-		return ret;
-
-	return 0;
+	return pci_write_config_byte(chip->pdev, 0xAE, scratch);
 }
 
 static int jmicron_probe(struct sdhci_pci_chip *chip)

  reply	other threads:[~2015-10-05 20:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-05 20:01 [PATCH 1/2] mmc: sdhci-pci: Build o2micro support in the same module kbuild test robot
2015-10-05 19:31 ` Ben Hutchings
2015-10-05 20:01   ` kbuild test robot [this message]
2015-10-08 17:35   ` Ulf Hansson

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=20151005200104.GA98459@xian \
    --to=lkp@intel.com \
    --cc=ben@decadent.org.uk \
    --cc=kbuild-all@01.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=peter.guo@bayhubtech.com \
    --cc=ulf.hansson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).