PCI: rcar: Teardown MSI setup if rcar_pcie_enable() fails
authorMarek Vasut <[email protected]>
Thu, 24 May 2018 14:36:21 +0000 (16:36 +0200)
committerLorenzo Pieralisi <[email protected]>
Thu, 24 May 2018 17:39:59 +0000 (18:39 +0100)
commit1aea58be739816f05232c64f970784d75a84cd96
tree8dacbee3fdd36b1fa8a4e6f28246d3d48abc8359
parent53f1aebfbe46ffe422138758c9d015502740f714
PCI: rcar: Teardown MSI setup if rcar_pcie_enable() fails

If the rcar_pcie_enable() fails and MSIs are enabled, the setup done in
rcar_pcie_enable_msi() is never undone. Add a function to tear down the
MSI setup by disabling the MSI handling in the PCIe block, deallocating
the pages requested for the MSIs and zapping the IRQ mapping.

Reported-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Marek Vasut <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Simon Horman <[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