Commit 2192ea7d authored by Chris Ball's avatar Chris Ball Committed by Luis Henriques

mfd: rtsx_pcr: Fix MSI enable error handling

commit 51529705 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: default avatarD. Jared Dominguez <Jared_Dominguez@Dell.com>
Tested-by: default avatarD. Jared Dominguez <Jared_Dominguez@Dell.com>
Signed-off-by: default avatarChris Ball <chris@printf.net>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent c5a2357f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment