From: Frank Mori Hess Date: Sat, 1 Mar 2003 01:03:39 +0000 (+0000) Subject: catch errors from find_calibration() X-Git-Tag: r0_7_21~250 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=afaad08b77dfd44eb5e882d028b05771ce3f1efb;p=comedilib.git catch errors from find_calibration() --- 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;