mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
[coverity] RFC ata-imx31.c UDMA mode timing tables out of bounds reads
mode only goes 0-4 the original commit mixed up the index and mode bad stuff must happen but its been here for 16 years Change-Id: I7e69f4e2574029a6bc3cea76e8803d2d0357d9e2
This commit is contained in:
parent
2109d524e8
commit
74552d5404
1 changed files with 2 additions and 2 deletions
|
|
@ -417,13 +417,13 @@ void ata_dma_set_mode(unsigned char mode)
|
|||
else if (dmamode == 0x40 && modeidx <= ATA_MAX_UDMA)
|
||||
{
|
||||
/* Using Ultra DMA */
|
||||
ata_set_udma_timings(dmamode);
|
||||
ata_set_udma_timings(modeidx);
|
||||
ata_dma_selected = ATA_DMA_UDMA;
|
||||
}
|
||||
else if (dmamode == 0x20 && modeidx <= ATA_MAX_MWDMA)
|
||||
{
|
||||
/* Using Multiword DMA */
|
||||
ata_set_mdma_timings(dmamode);
|
||||
ata_set_mdma_timings(modeidx);
|
||||
ata_dma_selected = ATA_DMA_MWDMA;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue