Fixed some ioctl() return values. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Wed, 05 Dec 2012 13:30:08 +0100
branchstable-1.5
changeset 2474 fb2fe8fae501
parent 2473 f62b64fdbc23
child 2475 9c18c29b8942
Fixed some ioctl() return values.
master/ioctl.c
--- a/master/ioctl.c	Wed Dec 05 12:15:49 2012 +0100
+++ b/master/ioctl.c	Wed Dec 05 13:30:08 2012 +0100
@@ -797,7 +797,7 @@
         return -EFAULT;
     }
 
-    return 0;
+    return ret;
 }
 
 /*****************************************************************************/
@@ -2017,9 +2017,9 @@
 
     for (i = 0; i < EC_MAX_SYNC_MANAGERS; i++) {
         if (data.syncs[i].config_this) {
-            if (ecrt_slave_config_sync_manager(sc, i, data.syncs[i].dir,
-                        data.syncs[i].watchdog_mode)) {
-                ret = -EINVAL;
+            ret = ecrt_slave_config_sync_manager(sc, i, data.syncs[i].dir,
+                        data.syncs[i].watchdog_mode);
+            if (ret) {
                 goto out_up;
             }
         }