From afaad08b77dfd44eb5e882d028b05771ce3f1efb Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Sat, 1 Mar 2003 01:03:39 +0000 Subject: [PATCH] catch errors from find_calibration() --- lib/calib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/calib.c b/lib/calib.c index 37a2cdf..7bb8fb4 100644 --- a/lib/calib.c +++ b/lib/calib.c @@ -279,6 +279,8 @@ int comedi_set_calibration( comedi_t *dev, unsigned int subdev, unsigned int cha if( retval < 0 ) return retval; cal_index = find_calibration( file_path, subdev, channel, range, aref ); + if( cal_index < 0 ) return cal_index; + retval = set_calibration( dev, file_path, cal_index ); if( retval < 0 ) return retval; -- 2.26.2