This series fixes two DPIO I/O object lifetime issues during probe
failure and device removal.
Patch 1 releases the I/O object when IRQ registration fails and removes
the unnecessary unregister call from the probe error path. Patch 2 frees
the managed IRQ before returning its resource to the MC pool and before
releasing the I/O object during removal.
Both patches carry their respective Fixes tags and are marked for stable
backporting. Patch 2 is based on patch 1, which removes the probe error
path call to unregister_dpio_irq_handlers() before that helper starts
freeing the managed IRQ.
Changes in v2:
- Present the two previously separate patches as a series.
- Remove the unnecessary unregister call from the probe error path, as
suggested by Ioana Ciornei.
- Move devm_free_irq() into unregister_dpio_irq_handlers(), as suggested
by Ioana Ciornei, to keep registration and unregistration in sync.
- Add Cc: stable@vger.kernel.org to both patches.
Based on Linux 7.3-rc3 (fd73f4a6659897191fa0d40695fe370925dd3780).
Myeonghun Pak (2):
soc: fsl: dpio: Fix cleanup on IRQ registration failure
soc: fsl: dpio: Free the IRQ before releasing the I/O object
drivers/soc/fsl/dpio/dpio-driver.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
2.53.0