Re: [PATCH v3 3/3] PCI: rzg3s: Fix IRQ domain initialization error handling
From: Claudiu Beznea
Date: Fri Aug 14 2026 - 09:05:27 EST
On 8/11/26 23:00, Prabhakar wrote:
From: Lad Prabhakar<prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
rzg3s_pcie_init_irqdomain() installs chained handlers for the INTx
parent interrupts before creating the INTx irqdomain and initializing
MSI support.
If any subsequent step fails, such as obtaining an INTx IRQ,
creating the irqdomain, or initializing MSI, the error path returns
without removing any chained handlers that were already installed.
This leaves stale handler and data pointers attached to the parent
interrupts.
Add a helper to tear down the INTx IRQ setup, including removing the IRQ
domain and clearing the chained handlers. Use it to unwind partially
completed initialization and from the normal IRQ domain teardown path.
Fixes: 7ef502fb35b28 ("PCI: Add Renesas RZ/G3S host controller driver")
Cc:stable@xxxxxxxxxxxxxxx
Signed-off-by: Lad Prabhakar<prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>