mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
SATA: check for return value from sata functions
sata functions are called even if previous functions failed because return value is not checked. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Dirk Behme <dirk.behme@de.bosch.com> CC: Fabio Estevam <fabio.estevam@freescale.com>
This commit is contained in:
parent
d87c85ce43
commit
71cadda3ff
1 changed files with 6 additions and 3 deletions
|
@ -48,9 +48,12 @@ int __sata_initialize(void)
|
|||
sata_dev_desc[i].block_write = sata_write;
|
||||
|
||||
rc = init_sata(i);
|
||||
rc = scan_sata(i);
|
||||
if ((sata_dev_desc[i].lba > 0) && (sata_dev_desc[i].blksz > 0))
|
||||
init_part(&sata_dev_desc[i]);
|
||||
if (!rc) {
|
||||
rc = scan_sata(i);
|
||||
if (!rc && (sata_dev_desc[i].lba > 0) &&
|
||||
(sata_dev_desc[i].blksz > 0))
|
||||
init_part(&sata_dev_desc[i]);
|
||||
}
|
||||
}
|
||||
sata_curr_device = 0;
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Reference in a new issue