mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-15 19:51:37 +00:00
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>
This commit is contained in:
parent
499f18446d
commit
4a05497a8c
1 changed files with 2 additions and 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue