diff options
Diffstat (limited to 'cmd/sata.c')
-rw-r--r-- | cmd/sata.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/sata.c b/cmd/sata.c index f56622acc2..4c53022ff6 100644 --- a/cmd/sata.c +++ b/cmd/sata.c @@ -28,14 +28,15 @@ static int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) if (sata_curr_device != -1) sata_stop(); - return sata_initialize(); + return (sata_initialize() < 0) ? + CMD_RET_FAILURE : CMD_RET_SUCCESS; } /* If the user has not yet run `sata init`, do it now */ if (sata_curr_device == -1) { rc = sata_initialize(); if (rc == -1) - return rc; + return CMD_RET_FAILURE; sata_curr_device = rc; } |