Skip to content

Commit

Permalink
dma: pl330: off by one in pl330_probe()
Browse files Browse the repository at this point in the history
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 <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Dan Carpenter authored and Vinod Koul committed Nov 13, 2013
1 parent 2dcbdce commit 02808b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/pl330.c
Original file line number Diff line number Diff line change
@@ -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,

0 comments on commit 02808b4

Please sign in to comment.