Re: [PATCH RFC 04/11] clocksource/drivers/arm_arch_timer_mmio: Dispose IRQ mappings on probe failure

From: Andy Shevchenko

Date: Fri Sep 25 2026 - 05:58:06 EST


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@xxxxxxxxxx>
> Cc: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Marc Zyngier <maz@xxxxxxxxxx>
> ---

Same here about Cc list...

...

> +static void arch_timer_mmio_unmap_irq(int *irq)
> +{
> + if (irq && *irq) {

Would be better to read and maintain with the negative check.

> + irq_dispose_mapping(*irq);
> + *irq = 0;
> + }
> +}

...

> +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++) {

> + struct arch_timer_mem_frame *frame = &gt_block->frame[i];
> +
> + if (!frame->valid)
> + continue;
> +
> + arch_timer_mmio_unmap_frame_irqs(frame);
> + }
> +}

--
With Best Regards,
Andy Shevchenko