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

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Sep 25 02:52:09 PDT 2026


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 at kernel.org>
> Cc: Mark Rutland <mark.rutland at arm.com>
> Cc: Marc Zyngier <maz at kernel.org>
> ---

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





More information about the linux-arm-kernel mailing list