From: kbuild test robot Date: Mon, 5 Oct 2015 20:01:04 +0000 (+0800) Subject: mmc: sdhci-pci: fix simple_return.cocci warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7582041ff3d4aaa348894858d6384c4a9981c5fc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mmc: sdhci-pci: fix simple_return.cocci warnings 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 Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index b3b0a3e4fca1..6d86dc882a83 100644 --- 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_chip *chip, int on) 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)