From: Frank Mori Hess Date: Thu, 10 May 2001 20:30:46 +0000 (+0000) Subject: changed order or error check in read_v22() to get rid of spurious EINVAL errors when... X-Git-Tag: r0_7_59~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a48a32f320c7c352df214c653b26c75876afb3fb;p=comedi.git changed order or error check in read_v22() to get rid of spurious EINVAL errors when using comedi_rt_timer --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index d691f086..fc8643bf 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1657,15 +1657,15 @@ printk("m is %d\n",m); if(mf_flags&O_NONBLOCK){ + retval=-EAGAIN; + break; + } if(!(s->subdev_flags&SDF_RUNNING)){ do_become_nonbusy(dev,s); retval=-EINVAL; break; } - if(file->f_flags&O_NONBLOCK){ - retval=-EAGAIN; - break; - } if(signal_pending(current)){ retval=-ERESTARTSYS; break;