]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - cmd/sata.c
sata: fix sata_Probe return value check
[thirdparty/u-boot.git] / cmd / sata.c
index cc12afb07e697728dce15460fd3189d3d44d5ddf..4f0c6e0137162e1990b115436be2e016a667edbd 100644 (file)
@@ -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;
        }