diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-15 03:28:44 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-11 16:08:19 (GMT) |
commit | f6580ef39b332387f84334d238320ce99115af67 (patch) | |
tree | b78bf42fde9e8fe489336498f558053cb7ac48bb /drivers/ata/ahci.c | |
parent | f6ab5a92acc78371fc088075b64bd394d1f0d45f (diff) | |
download | u-boot-f6580ef39b332387f84334d238320ce99115af67.tar.xz |
dm: scsi: Adjust return value of scsi_exec()
Change this function to return an error number instead of true/false.
This allows us to return a proper error number.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 5a20b97..3528a1f 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -960,14 +960,14 @@ static int ahci_scsi_exec(struct udevice *dev, struct scsi_cmd *pccb) break; default: printf("Unsupport SCSI command 0x%02x\n", pccb->cmd[0]); - return false; + return -ENOTSUPP; } if (ret) { debug("SCSI command 0x%02x ret errno %d\n", pccb->cmd[0], ret); - return false; + return ret; } - return true; + return 0; } |