diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-10-13 13:19:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-10-13 13:19:56 +0000 |
commit | a03e58b7acd56df24404d42652efc1c75725adda (patch) | |
tree | a58ece7b3e2a1a82e201e074acaabba430baadac /apps | |
parent | e4ccbe7508fd31b76790986fc654dc588efb9dfe (diff) | |
download | px4-firmware-a03e58b7acd56df24404d42652efc1c75725adda.tar.gz px4-firmware-a03e58b7acd56df24404d42652efc1c75725adda.tar.bz2 px4-firmware-a03e58b7acd56df24404d42652efc1c75725adda.zip |
ADC support for the Shenzhou board from Darcy Gong
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5232 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps')
-rw-r--r-- | apps/examples/adc/adc_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/examples/adc/adc_main.c b/apps/examples/adc/adc_main.c index 404fba8c1..553658fee 100644 --- a/apps/examples/adc/adc_main.c +++ b/apps/examples/adc/adc_main.c @@ -289,7 +289,7 @@ int adc_main(int argc, char *argv[]) { message("adc_main: open %s failed: %d\n", g_adcstate.devpath, errno); errval = 2; - goto errout_with_dev; + goto errout; } /* Now loop the appropriate number of times, displaying the collected @@ -357,6 +357,11 @@ int adc_main(int argc, char *argv[]) } } + close(fd); + return OK; + + /* Error exits */ + errout_with_dev: close(fd); |