Skip to content
Snippets Groups Projects
Commit 71cadda3 authored by Stefano Babic's avatar Stefano Babic Committed by Albert ARIBAUD
Browse files

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: default avatarStefano Babic <sbabic@denx.de>
CC: Dirk Behme <dirk.behme@de.bosch.com>
CC: Fabio Estevam <fabio.estevam@freescale.com>
parent d87c85ce
No related branches found
No related tags found
No related merge requests found
...@@ -48,9 +48,12 @@ int __sata_initialize(void) ...@@ -48,9 +48,12 @@ int __sata_initialize(void)
sata_dev_desc[i].block_write = sata_write; sata_dev_desc[i].block_write = sata_write;
rc = init_sata(i); rc = init_sata(i);
rc = scan_sata(i); if (!rc) {
if ((sata_dev_desc[i].lba > 0) && (sata_dev_desc[i].blksz > 0)) rc = scan_sata(i);
init_part(&sata_dev_desc[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; sata_curr_device = 0;
return rc; return rc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment