From ad40297bf280b0cf26698b57a5d7221cf7037ef1 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 28 May 2003 21:22:59 +0000 Subject: [PATCH] catch some errors --- comedi_calibrate/cb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/comedi_calibrate/cb.c b/comedi_calibrate/cb.c index b7576f3..b8d886c 100644 --- a/comedi_calibrate/cb.c +++ b/comedi_calibrate/cb.c @@ -110,10 +110,12 @@ int cb_setup( calibration_setup_t *setup, const char *device_name ) static int setup_cb_pci_1xxx( calibration_setup_t *setup ) { + int retval; static const int caldac_subdev = 4; static const int calpot_subdev = 5; - init_observables_1xxx( setup ); + retval = init_observables_1xxx( setup ); + if( retval < 0 ) return retval; setup_caldacs( setup, caldac_subdev ); setup_caldacs( setup, calpot_subdev ); setup->do_cal = cal_cb_pci_1xxx; @@ -122,11 +124,13 @@ static int setup_cb_pci_1xxx( calibration_setup_t *setup ) static int setup_cb_pci_1602_16( calibration_setup_t *setup ) { + int retval; static const int caldac_subdev = 4; static const int calpot_subdev = 5; static const int dac08_subdev = 6; - init_observables_1xxx( setup ); + retval = init_observables_1xxx( setup ); + if( retval < 0 ) return retval; setup_caldacs( setup, caldac_subdev ); setup_caldacs( setup, calpot_subdev ); setup_caldacs( setup, dac08_subdev ); -- 2.26.2