From: Samuel Dionne-Riel Date: Mon, 20 Dec 2021 23:23:45 +0000 (-0500) Subject: cmd: adc: Report return value on error X-Git-Tag: v2022.04-rc1~31^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a05497a8ce9292017b7a5d0e48ecc45705a0a4b;p=pandora-u-boot.git 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 --- diff --git a/cmd/adc.c b/cmd/adc.c index 16f914a030e..75739bc8eed 100644 --- a/cmd/adc.c +++ b/cmd/adc.c @@ -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; }