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 f84d904205..2885995f8c 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
388 return _ata_read_sectors(IF_MD2(drive,) map_sector(start), count, buf); 388 return _ata_read_sectors(IF_MD2(drive,) map_sector(start), count, buf);
389 else 389 else
390 { 390 {
391 int i, ret; 391 int i;
392 unsigned char* dest = (unsigned char*)buf; 392 unsigned char* dest = (unsigned char*)buf;
393 393
394 /* Read sectors in parts of 0x8000 */ 394 /* Read sectors in parts of 0x8000 */
395 for(i=0; i<count; i+=64) 395 for(i=0; i<count; i+=64)
396 { 396 {
397 ret = _ata_read_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest); 397 int ret = _ata_read_sectors(IF_MD2(drive,) map_sector(start+i), (count-i >= 64 ? 64 : count-i), (void*)dest);
398 if(ret != 0) 398 if(ret != 0)
399 return ret; 399 return ret;
400 400
401 dest += (count-i >= 64 ? 0x8000 : (count-i)*512); 401 dest += (count-i >= 64 ? 0x8000 : (count-i)*512);
402 } 402 }
403 403
404 return ret; 404 return 0;
405 } 405 }
406} 406}
407 407