summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c
index f84d904..2885995 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c
@@ -388,20 +388,20 @@ int ata_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* bu
return _ata_read_sectors(IF_MD2(drive,) map_sector(start), count, buf);
else
{
- int i, ret;
+ int i;
unsigned char* dest = (unsigned char*)buf;
/* Read sectors in parts of 0x8000 */
for(i=0; i<count; i+=64)
{
- ret = _ata_read_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest);
+ int ret = _ata_read_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest);
if(ret != 0)
return ret;
dest += (count-i >= 64 ? 0x8000 : (count-i)*512);
}
- return ret;
+ return 0;
}
}