From 87a399e6b393c803cedcb5f4005680d119167617 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 13 Oct 2012 13:19:56 +0000 Subject: [PATCH] ADC support for the Shenzhou board from Darcy Gong git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5232 42af7a65-404d-4744-a932-0658087f49c3 --- examples/adc/adc_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/adc/adc_main.c b/examples/adc/adc_main.c index 404fba8c1..553658fee 100644 --- a/examples/adc/adc_main.c +++ b/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);