ACK: [Trusty][PATCH] mfd: rtsx_pcr: Fix MSI enable error handling
Brad Figg
brad.figg at canonical.com
Wed Oct 22 12:04:19 UTC 2014
On 10/22/2014 01:44 AM, Adam Lee wrote:
> From: Chris Ball <chris at printf.net>
>
> BugLink: http://bugs.launchpad.net/bugs/1366841
>
> 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 at vger.kernel.org>
> Reported-by: D. Jared Dominguez <Jared_Dominguez at Dell.com>
> Tested-by: D. Jared Dominguez <Jared_Dominguez at Dell.com>
> Signed-off-by: Chris Ball <chris at printf.net>
> Signed-off-by: Lee Jones <lee.jones at linaro.org>
> (cherry picked from commit 5152970538a5e16c03bbcb9f1c780489a795ed40)
> Signed-off-by: Adam Lee <adam.lee at canonical.com>
> ---
> drivers/mfd/rtsx_pcr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
> index d8ab56d..e1b8126 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;
> }
>
>
--
Brad Figg brad.figg at canonical.com http://www.canonical.com
More information about the kernel-team
mailing list