aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/mmc/host/sdhci-pci-core.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-05-31 12:32:23 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2019-06-10 17:11:09 +0200
commit90298dc353bc1327d59da30d4b1e4d50d5513033 (patch)
tree29cb8f5683482fd2c44b00c64ba4c437749db0ef /drivers/mmc/host/sdhci-pci-core.c
parentdt-bindings: mmc: sun4i: Add YAML schemas (diff)
downloadwireguard-linux-90298dc353bc1327d59da30d4b1e4d50d5513033.tar.xz
wireguard-linux-90298dc353bc1327d59da30d4b1e4d50d5513033.zip
mmc: sdhci-pci: remove redundant check of slots == 0
The calculation of slots results in a value in the range 1..8 and so slots can never be zero. The check for slots == 0 is always going to be false, hence it is redundant and can be removed. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pci-core.c')
-rw-r--r--drivers/mmc/host/sdhci-pci-core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 4154ee11b47d..fa6a8fa560c3 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -2040,8 +2040,6 @@ static int sdhci_pci_probe(struct pci_dev *pdev,
slots = PCI_SLOT_INFO_SLOTS(slots) + 1;
dev_dbg(&pdev->dev, "found %d slot(s)\n", slots);
- if (slots == 0)
- return -ENODEV;
BUG_ON(slots > MAX_SLOTS);