diff mbox

[1/2] PCI: imx6: Return the real error code

Message ID 1441928609-21921-1-git-send-email-festevam@gmail.com
State Superseded
Headers show

Commit Message

Fabio Estevam Sept. 10, 2015, 11:43 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com>

When devm_request_irq() fails we should better return the real
error code instead of returning a 'fake' one.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/pci/host/pci-imx6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lucas Stach Sept. 11, 2015, 8:25 a.m. UTC | #1
Am Donnerstag, den 10.09.2015, 20:43 -0300 schrieb Fabio Estevam:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> When devm_request_irq() fails we should better return the real
> error code instead of returning a 'fake' one.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

> ---
>  drivers/pci/host/pci-imx6.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
> index 8f3a981..2d0d0fe 100644
> --- a/drivers/pci/host/pci-imx6.c
> +++ b/drivers/pci/host/pci-imx6.c
> @@ -539,7 +539,7 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp,
>  				       IRQF_SHARED, "mx6-pcie-msi", pp);
>  		if (ret) {
>  			dev_err(&pdev->dev, "failed to request MSI irq\n");
> -			return -ENODEV;
> +			return ret;
>  		}
>  	}
>
diff mbox

Patch

diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 8f3a981..2d0d0fe 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -539,7 +539,7 @@  static int __init imx6_add_pcie_port(struct pcie_port *pp,
 				       IRQF_SHARED, "mx6-pcie-msi", pp);
 		if (ret) {
 			dev_err(&pdev->dev, "failed to request MSI irq\n");
-			return -ENODEV;
+			return ret;
 		}
 	}