]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mfd: rtsx_pcr: Fix MSI enable error handling
authorChris Ball <chris@printf.net>
Thu, 4 Sep 2014 16:11:53 +0000 (17:11 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 26 Sep 2014 07:23:52 +0000 (08:23 +0100)
pci_enable_msi() can return failure with both positive and negative
integers -- it returns 0 for success -- but is only tested here for
"if (ret < 0)".  This causes us to try to use MSI on the RTS5249 SD
reader in the Dell XPS 11 when enabling MSI failed, causing:

[    1.737110] rtsx_pci: probe of 0000:05:00.0 failed with error -110

Cc: stable <stable@vger.kernel.org>
Reported-by: D. Jared Dominguez <Jared_Dominguez@Dell.com>
Tested-by: D. Jared Dominguez <Jared_Dominguez@Dell.com>
Signed-off-by: Chris Ball <chris@printf.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rtsx_pcr.c

index d01b8c24923104287ed84927038cb51576a4f7d6..f2643c221d345ebca0b7a9ff3266443ac1f0801b 100644 (file)
@@ -1197,7 +1197,7 @@ static int rtsx_pci_probe(struct pci_dev *pcidev,
        pcr->msi_en = msi_en;
        if (pcr->msi_en) {
                ret = pci_enable_msi(pcidev);
-               if (ret < 0)
+               if (ret)
                        pcr->msi_en = false;
        }