summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Ball <chris@printf.net>2014-09-04 17:11:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 08:59:50 -0800
commitb9b75d07752445ee906b4601cc447d64ed49766b (patch)
tree3d07abfc34adbc75685b5b9422d22d69e1e09175
parentd2501bb0cf166503c427f13aeb73547ccecf66f5 (diff)
downloadlwn-b9b75d07752445ee906b4601cc447d64ed49766b.tar.gz
lwn-b9b75d07752445ee906b4601cc447d64ed49766b.zip
mfd: rtsx_pcr: Fix MSI enable error handling
commit 5152970538a5e16c03bbcb9f1c780489a795ed40 upstream. 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 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/mfd/rtsx_pcr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index 1d15735f9ef9..89b4c4216d0c 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1177,7 +1177,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;
}