changed order or error check in read_v22() to get rid of spurious EINVAL errors when...
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 10 May 2001 20:30:46 +0000 (20:30 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 10 May 2001 20:30:46 +0000 (20:30 +0000)
comedi/comedi_fops.c

index d691f0866a8e12769f873b084f8aa09372a989c1..fc8643bf683969a1a00035d48945c65365f04fdb 100644 (file)
@@ -1657,15 +1657,15 @@ printk("m is %d\n",m);
                if(m<n)n=m;
 
                if(n==0){
+                       if(file->f_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;