• Marek Vasut's avatar
    PCI: rcar: Remove IRQ mappings in rcar_pcie_enable_msi() failpath · 0bbf6b92
    Marek Vasut authored
    The rcar_pcie_enable_msi() creates IRQ mappings using irq_create_mapping()
    before requesting the IRQs using devm_request_irq(). If devm_request_irq()
    fails for some reason, rcar_pcie_enable_msi() does not remove the mapping.
    
    Pull out the code for disposing IRQ mappings from rcar_pcie_teardown_msi()
    into a separate function and call it from both rcar_pcie_teardown_msi()
    and rcar_pcie_enable_msi() failpath to remove the mappings correctly.
    Reported-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@gmail.com>
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: Geert Uytterhoeven <geert+renesas@glider.be>
    Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: Phil Edworthy <phil.edworthy@renesas.com>
    Cc: Simon Horman <horms+renesas@verge.net.au>
    Cc: Wolfram Sang <wsa@the-dreams.de>
    Cc: linux-renesas-soc@vger.kernel.org
    0bbf6b92
pcie-rcar.c 29.7 KB