PCI: rcar: Add missing irq_dispose_mapping() into failpath
authorMarek Vasut <[email protected]>
Thu, 24 May 2018 14:36:20 +0000 (16:36 +0200)
committerLorenzo Pieralisi <[email protected]>
Thu, 24 May 2018 17:39:24 +0000 (18:39 +0100)
commit53f1aebfbe46ffe422138758c9d015502740f714
tree3040e28809caafad52297e179797794b12dbb19c
parent80b8471e69d706d7622bbd633aca611d11b389b7
PCI: rcar: Add missing irq_dispose_mapping() into failpath

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 <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Cc: Phil Edworthy <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Wolfram Sang <[email protected]>
Cc: [email protected]
drivers/pci/host/pcie-rcar.c