# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1354710608 -3600
# Node ID fb2fe8fae501bc1d9e8f26679ef0476d3de7155c
# Parent  f62b64fdbc239d65c1bb71d17d04e3e4739b9435
Fixed some ioctl() return values.

diff -r f62b64fdbc23 -r fb2fe8fae501 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;
             }
         }