From c413483a6694f782e1d2e154d3c37acf74d5500f Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Tue, 7 May 2013 13:29:54 +0100 Subject: [PATCH] demo/dio: exit with failure if comedi_dio_config() fails. --- demo/dio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demo/dio.c b/demo/dio.c index 16464b2..d7b5227 100644 --- a/demo/dio.c +++ b/demo/dio.c @@ -58,6 +58,10 @@ int main(int argc, char *argv[]) printf("for input.\n"); ret = comedi_dio_config(device, options.subdevice, options.channel, COMEDI_INPUT); } + if(ret < 0){ + comedi_perror("comedi_dio_config"); + exit(-1); + } return 0; }