From: Dan Carpenter Date: Fri, 8 Nov 2013 09:50:24 +0000 (+0300) Subject: dma: pl330: off by one in pl330_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02808b427689d46136d9662c5013145f70119f42;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git dma: pl330: off by one in pl330_probe() There are only AMBA_NR_IRQS (2) elements in adev->irq[]. This code maybe works if the there is a zero directly after the array. Signed-off-by: Dan Carpenter Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 75328f9870d2..ebd23b036a69 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2922,7 +2922,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) amba_set_drvdata(adev, pdmac); - for (i = 0; i <= AMBA_NR_IRQS; i++) { + for (i = 0; i < AMBA_NR_IRQS; i++) { irq = adev->irq[i]; if (irq) { ret = devm_request_irq(&adev->dev, irq,