mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
sata: fix sata_Probe return value check
sata_probe returns 1 for failure, so don't checkout for < 0
fixes: f19f1ecb60
dm: sata: Support driver model with the 'sata' command
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -107,8 +107,8 @@ static int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
/* If the user has not yet run `sata init`, do it now */
|
/* If the user has not yet run `sata init`, do it now */
|
||||||
if (sata_curr_device == -1) {
|
if (sata_curr_device == -1) {
|
||||||
rc = sata_probe(0);
|
rc = sata_probe(0);
|
||||||
if (rc < 0)
|
if (rc)
|
||||||
return CMD_RET_FAILURE;
|
return rc;
|
||||||
sata_curr_device = 0;
|
sata_curr_device = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user