On Fri, Sep 25, 2026 at 09:48:03AM +0200, Lorenzo Pieralisi wrote:
On probe failure the driver does not dispose the IRQ mappings that
were carried out before the probe function hit an error condition.
Add code to dispose the IRQ mappings on driver probe failure.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
---
Same here about Cc list...
...
quoted hunk ↗ jump to hunk
+static void arch_timer_mmio_unmap_irq(int *irq)
+{
+ if (irq && *irq) {
Would be better to read and maintain with the negative check.
quoted hunk ↗ jump to hunk
+ irq_dispose_mapping(*irq);
+ *irq = 0;
+ }
+}
...
quoted hunk ↗ jump to hunk
+static void arch_timer_mmio_unmap_irqs(struct arch_timer_mem *gt_block)
+{
+ int i;
Why signed?
+ for (i = 0; i < ARCH_TIMER_MEM_MAX_FRAMES; i++) {
for (unsigned int i = 0; i < ARCH_TIMER_MEM_MAX_FRAMES; i++) {
quoted hunk ↗ jump to hunk
+ struct arch_timer_mem_frame *frame = >_block->frame[i];
+
+ if (!frame->valid)
+ continue;
+
+ arch_timer_mmio_unmap_frame_irqs(frame);
+ }
+}
--
With Best Regards,
Andy Shevchenko