mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
PCI: rockchip: Fix platform_get_irq() error handling
When platform_get_irq() fails we should propagate the real error value instead of always returning -EINVAL. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
parent
cecaf5cdfc
commit
81edd471a6
@ -962,7 +962,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
|
||||
irq = platform_get_irq_byname(pdev, "sys");
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "missing sys IRQ resource\n");
|
||||
return -EINVAL;
|
||||
return irq;
|
||||
}
|
||||
|
||||
err = devm_request_irq(dev, irq, rockchip_pcie_subsys_irq_handler,
|
||||
@ -975,7 +975,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
|
||||
irq = platform_get_irq_byname(pdev, "legacy");
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "missing legacy IRQ resource\n");
|
||||
return -EINVAL;
|
||||
return irq;
|
||||
}
|
||||
|
||||
irq_set_chained_handler_and_data(irq,
|
||||
@ -985,7 +985,7 @@ static int rockchip_pcie_setup_irq(struct rockchip_pcie *rockchip)
|
||||
irq = platform_get_irq_byname(pdev, "client");
|
||||
if (irq < 0) {
|
||||
dev_err(dev, "missing client IRQ resource\n");
|
||||
return -EINVAL;
|
||||
return irq;
|
||||
}
|
||||
|
||||
err = devm_request_irq(dev, irq, rockchip_pcie_client_irq_handler,
|
||||
|
Loading…
Reference in New Issue
Block a user