On 05/22/2018 05:18 PM, Geert Uytterhoeven wrote: > Hi Marek, Hi, > On Mon, May 21, 2018 at 3:11 PM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote: >> The rcar_pcie_get_resources() is another misnomer with a side effect. >> The function does not only get resources, but also maps MSI IRQs via >> irq_of_parse_and_map(). In case anything fails afterward, the IRQ >> mapping must be disposed through irq_dispose_mapping() which is not >> done. >> >> This patch handles irq_of_parse_and_map() failures in by disposing >> of the mapping in rcar_pcie_get_resources() as well as in probe. >> >> Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxx> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > >> --- a/drivers/pci/host/pcie-rcar.c >> +++ b/drivers/pci/host/pcie-rcar.c >> @@ -923,18 +923,25 @@ static int rcar_pcie_get_resources(struct rcar_pcie *pcie) >> i = irq_of_parse_and_map(dev->of_node, 0); >> if (!i) { >> dev_err(dev, "cannot get platform resources for msi interrupt\n"); >> - return -ENOENT; >> + err = -ENOENT; >> + goto err_irq1; > > You could have kept the return here. I like the symmetry ;-) [...] -- Best regards, Marek Vasut