summaryrefslogtreecommitdiff
path: root/cmd/sata.c
diff options
context:
space:
mode:
authorTroy Kisky <troy.kisky@boundarydevices.com>2018-07-27 16:45:26 -0700
committerTom Rini <trini@konsulko.com>2018-08-10 10:27:32 -0400
commit7e83f1d5e819c76d50fc4daee9d4b5348bf3dc0f (patch)
tree2aab091303b03c90dfbe81636e3e34bfef475c0a /cmd/sata.c
parent17585e2dc33c23b3ea37daf485ced880c8fea3f8 (diff)
sata: fix sata_Probe return value check
sata_probe returns 1 for failure, so don't checkout for < 0 fixes: f19f1ecb6025 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>
Diffstat (limited to 'cmd/sata.c')
-rw-r--r--cmd/sata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/sata.c b/cmd/sata.c
index cc12afb07e..4f0c6e0137 100644
--- a/cmd/sata.c
+++ b/cmd/sata.c
@@ -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 (sata_curr_device == -1) {
rc = sata_probe(0);
- if (rc < 0)
- return CMD_RET_FAILURE;
+ if (rc)
+ return rc;
sata_curr_device = 0;
}