Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebcdaee4 authored by Jean-Philippe Brucker's avatar Jean-Philippe Brucker Committed by Vinod Koul
Browse files

dmaengine: pl330: fix warning in pl330_remove



When removing a device with less than 9 IRQs (AMBA_NR_IRQS), we'll get a
big WARN_ON from devres.c because pl330_remove calls devm_free_irqs for
unallocated irqs. Similarly to pl330_probe, check that IRQ number is
present before calling devm_free_irq.

Signed-off-by: default avatarJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 56b17705
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3008,6 +3008,7 @@ static int pl330_remove(struct amba_device *adev)

	for (i = 0; i < AMBA_NR_IRQS; i++) {
		irq = adev->irq[i];
		if (irq)
			devm_free_irq(&adev->dev, irq, pl330);
	}