Skip to content

Commit

Permalink
mfd: rtsx_pcr: Fix MSI enable error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Ball authored and Lee Jones committed Sep 26, 2014
1 parent 6a71f38 commit 5152970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mfd/rtsx_pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5152970

Please sign in to comment.