sata: fix sata_Probe return value check
PATCH 1/1 sata: fix sata_Probe return value check
sata_probe returns 1 for failure, so don't checkout for < 0
Fixes f19f1ecb6025 dm: sata: Support driver model with the 'sata' command
Signed-off-by Troy Kisky <[email protected]>
cmd/sata.c +2 -2
@@ -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 ; }
Signature · 1 line
2.14.1
PATCH 1/1 sata: fix sata_Probe return value check
Quoted 7 lines · Troy Kisky
sata_probereturns 1 for failure, so don't checkout for < 0Fixes f19f1ecb6025 dm: sata: Support driver model with the 'sata' commandSigned-off-by Troy Kisky <[email protected]>
Thanks!
Reviewed-by Simon Glass <[email protected]>
cmd/sata.c
Quoted 9 lines · Troy Kisky
sata_probereturns 1 for failure, so don't checkout for < 0Fixes f19f1ecb6025 dm: sata: Support driver model with the 'sata' commandSigned-off-by Troy Kisky <[email protected]>Reviewed-by Simon Glass <[email protected]>cmd/sata.c +0
-0
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180810/dd9c4087/attachment.sig>