This patch fixes an obvious array overrun spotted by the Coverity
checker.
Signed-off-by: Adrian Bunk <[email protected]>
---
9101f2e2691094244bd147a05225f6c84bdf7404
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 53070f6..00039a1 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -214,7 +214,7 @@ static void cs5536_set_dmamode(struct ata_port *ap, struct ata_device *adev)
cs5536_read(pdev, DTC, &dtc);
dtc &= ~(IDE_DRV_MASK << dshift);
- dtc |= mwdma_timings[mode] << dshift;
+ dtc |= mwdma_timings[mode - XFER_MW_DMA_0] << dshift;
cs5536_write(pdev, DTC, dtc);
}
>>>>> "Adrian" == Adrian Bunk <[email protected]> writes:
Adrian> This patch fixes an obvious array overrun spotted by the
Adrian> Coverity checker.
Bart already posted a patch for this.
--
Martin K. Petersen http://mkp.net/