提交 7e83f1d5 编写于 作者: T Troy Kisky 提交者: Tom Rini

sata: fix sata_Probe return value check

sata_probe returns 1 for failure, so don't checkout for < 0

fixes: f19f1ecb dm: sata: Support driver model with the 'sata' command
Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 17585e2d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册