diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-11 11:52:50 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-11 11:52:50 +0000 |
commit | 7c055d9648b20e9545ffe706e304f04c3d9733f6 (patch) | |
tree | 7cd13ff841cef5f1a31ce9bedb857eb64747f72e | |
parent | 2da430bda19892930d21de5a39efc964b33934ec (diff) | |
download | rockbox-7c055d9648b20e9545ffe706e304f04c3d9733f6.tar.gz rockbox-7c055d9648b20e9545ffe706e304f04c3d9733f6.zip |
ata-creative-zvm: make sure return value is defined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26771 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/tms320dm320/creative-zvm/ata-creativezvm.c | 6 |
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 | ||