mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-27 06:01:12 +00:00
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>
This commit is contained in:
parent
315a75ea5d
commit
003f558269
@ -1137,7 +1137,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user