diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2021-12-21 02:23:45 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-14 21:16:11 +0300 |
commit | 4a05497a8ce9292017b7a5d0e48ecc45705a0a4b (patch) | |
tree | a982ab4dffe7621ffe1edef66cfff6ea136703e7 /cmd | |
parent | 499f18446d2ceb4a48730e9ef3111bcbd9fae9de (diff) | |
download | u-boot-4a05497a8ce9292017b7a5d0e48ecc45705a0a4b.tar.xz |
cmd: adc: Report return value on error
Reporting the return value should always be done on error conditions,
this way the developer can start debugging issues with more knowledge
in-hand.
Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/adc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -81,8 +81,8 @@ static int do_adc_single(struct cmd_tbl *cmdtp, int flag, int argc, ret = adc_channel_single_shot(argv[1], simple_strtol(argv[2], NULL, 0), &data); if (ret) { - printf("Error getting single shot for device %s channel %s\n", - argv[1], argv[2]); + printf("Error getting single shot for device %s channel %s (ret=%d)\n", + argv[1], argv[2], ret); return CMD_RET_FAILURE; } |