catch errors from find_calibration()
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 1 Mar 2003 01:03:39 +0000 (01:03 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 1 Mar 2003 01:03:39 +0000 (01:03 +0000)
lib/calib.c

index 37a2cdfb893a686b46bfff83308eca293f7f80d3..7bb8fb4b2c667aeafd7580760ca4843bfebd23c3 100644 (file)
@@ -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;