From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] mmc: sdhci-pci: fix simple_return.cocci warnings Date: Tue, 6 Oct 2015 04:01:04 +0800 Message-ID: <20151005200104.GA98459@xian> References: <201510060335.Yp1RsHmL%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga09.intel.com ([134.134.136.24]:5285 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288AbbJEUC2 (ORCPT ); Mon, 5 Oct 2015 16:02:28 -0400 Content-Disposition: inline In-Reply-To: <1444073478.2730.308.camel@decadent.org.uk> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Ben Hutchings Cc: kbuild-all@01.org, Ulf Hansson , Peter Guo , linux-mmc@vger.kernel.org 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 Signed-off-by: Fengguang Wu --- 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)