Message ID | 1508018851-9272-5-git-send-email-festevam@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
On 15.10.2017 00:07, Fabio Estevam wrote: > When platform_get_irq() fails we should propagate the real error value > instead of always returning -EINVAL. > > Cc: Michal Simek <michal.simek@xilinx.com> > Signed-off-by: Fabio Estevam <festevam@gmail.com> > --- > drivers/pci/host/pcie-xilinx-nwl.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c > index 65dea98..b896167 100644 > --- a/drivers/pci/host/pcie-xilinx-nwl.c > +++ b/drivers/pci/host/pcie-xilinx-nwl.c > @@ -591,7 +591,7 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) > msi->irq_msi1 = platform_get_irq_byname(pdev, "msi1"); > if (msi->irq_msi1 < 0) { > dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi1); > - ret = -EINVAL; > + ret = msi->irq_msi1; > goto err; > } > > @@ -602,7 +602,7 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) > msi->irq_msi0 = platform_get_irq_byname(pdev, "msi0"); > if (msi->irq_msi0 < 0) { > dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi0); > - ret = -EINVAL; > + ret = msi->irq_msi0; > goto err; > } > > @@ -735,7 +735,7 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) > if (pcie->irq_misc < 0) { > dev_err(dev, "failed to get misc IRQ %d\n", > pcie->irq_misc); > - return -EINVAL; > + return pcie->irq_misc; > } > > err = devm_request_irq(dev, pcie->irq_misc, > Acked-by: Michal Simek <michal.simek@xilinx.com> Thanks, Michal
diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c index 65dea98..b896167 100644 --- a/drivers/pci/host/pcie-xilinx-nwl.c +++ b/drivers/pci/host/pcie-xilinx-nwl.c @@ -591,7 +591,7 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) msi->irq_msi1 = platform_get_irq_byname(pdev, "msi1"); if (msi->irq_msi1 < 0) { dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi1); - ret = -EINVAL; + ret = msi->irq_msi1; goto err; } @@ -602,7 +602,7 @@ static int nwl_pcie_enable_msi(struct nwl_pcie *pcie) msi->irq_msi0 = platform_get_irq_byname(pdev, "msi0"); if (msi->irq_msi0 < 0) { dev_err(dev, "failed to get IRQ#%d\n", msi->irq_msi0); - ret = -EINVAL; + ret = msi->irq_msi0; goto err; } @@ -735,7 +735,7 @@ static int nwl_pcie_bridge_init(struct nwl_pcie *pcie) if (pcie->irq_misc < 0) { dev_err(dev, "failed to get misc IRQ %d\n", pcie->irq_misc); - return -EINVAL; + return pcie->irq_misc; } err = devm_request_irq(dev, pcie->irq_misc,
When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> --- drivers/pci/host/pcie-xilinx-nwl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)