]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mmc: sdhci-pci: remove redundant check of slots == 0
authorColin Ian King <colin.king@canonical.com>
Fri, 31 May 2019 11:32:23 +0000 (12:32 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 10 Jun 2019 15:11:09 +0000 (17:11 +0200)
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>
drivers/mmc/host/sdhci-pci-core.c

index 4154ee11b47dc59a6927ffc50e06c388f962c88c..fa6a8fa560c37c977f5bbeb3cfcf6ad2e176695f 100644 (file)
@@ -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);