Message ID | 1508018851-9272-3-git-send-email-festevam@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c index db93efd..05f8c33 100644 --- a/drivers/pci/host/pcie-mediatek.c +++ b/drivers/pci/host/pcie-mediatek.c @@ -642,6 +642,8 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, int err, irq; irq = platform_get_irq(pdev, port->slot); + if (irq < 0) + return irq; err = devm_request_irq(dev, irq, mtk_pcie_intr_handler, IRQF_SHARED, "mtk-pcie", port); if (err) {
platform_get_irq() may fail and in the case of failure the error value should be propagated. Cc: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> --- drivers/pci/host/pcie-mediatek.c | 2 ++ 1 file changed, 2 insertions(+)