Skip to content
Snippets Groups Projects
Commit 8547f45b authored by Gary Bisson's avatar Gary Bisson Committed by Tom Rini
Browse files

cmd: sata: fix init command return value


Since commit aa6ab905, sata_initialize returns -1 if init_sata or
scan_sata fails. But this return value becomes the do_sata return
value which is equivalent to CMD_RET_USAGE.

In case one issues 'sata init' and that the hardware fails to
initialize, there's no need to display the command usage. Instead
the command shoud just return the CMD_RET_FAILURE value.

Fixes: aa6ab905 (sata: fix sata command can not being executed bug)

Signed-off-by: default avatarGary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: default avatarEric Nelson <eric@nelint.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 7f73ca48
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment