[U-Boot] [PATCH] cmd: sata: fix init command return value

Simon Glass sjg at chromium.org
Thu Jan 12 06:07:16 CET 2017


On 11 January 2017 at 08:51, Gary Bisson
<gary.bisson at boundarydevices.com> wrote:
>
> Since commit aa6ab905b2, 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: aa6ab905b2 (sata: fix sata command can not being executed bug)
>
> Signed-off-by: Gary Bisson <gary.bisson at boundarydevices.com>
> ---
>  cmd/sata.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)


Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list