Only check if parse_insn returns a negative value.
authorFrank Mori Hess <fmhess@speakeasy.net>
Mon, 5 Feb 2007 04:04:56 +0000 (04:04 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Mon, 5 Feb 2007 04:04:56 +0000 (04:04 +0000)
comedi/comedi_fops.c

index 32f9bf1418544d4a6215b741671fd02ac8634123..23cbdaa90d55771ab2f025b4b60ec3acbf9eb42a 100644 (file)
@@ -599,11 +599,6 @@ static int do_insnlist_ioctl(comedi_device *dev,void *arg,void *file)
                }
                ret = parse_insn(dev,insns+i,data,file);
                if(ret<0)goto error;
-               if(ret!=insns[i].n){
-                       printk("BUG: result of insn != insn.n\n");
-                       ret=-EINVAL;
-                       goto error;
-               }
                if(insns[i].insn&INSN_MASK_READ){
                        if(copy_to_user(insns[i].data,data,
                                        insns[i].n*sizeof(lsampl_t))){