Fixed missing return causing slaves not going to OP. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Thu, 22 Sep 2011 16:52:54 +0200
branchstable-1.5
changeset 2120 7dd86c484192
parent 2119 79d44885021f
child 2121 d05df15dcc6c
Fixed missing return causing slaves not going to OP.
master/fsm_master.c
--- a/master/fsm_master.c	Mon Sep 19 13:12:32 2011 +0200
+++ b/master/fsm_master.c	Thu Sep 22 16:52:54 2011 +0200
@@ -207,7 +207,8 @@
                 fsm->slaves_responding);
     }
 
-    if (fsm->link_state && !master->main_device.link_state) { // link went down
+    if (fsm->link_state && !master->main_device.link_state) {
+        // link went down
         EC_MASTER_DBG(master, 1, "Master state machine detected "
                 "link down. Clearing slave list.\n");
 
@@ -267,7 +268,8 @@
             }
 
             size = sizeof(ec_slave_t) * master->slave_count;
-            if (!(master->slaves = (ec_slave_t *) kmalloc(size, GFP_KERNEL))) {
+            if (!(master->slaves =
+                        (ec_slave_t *) kmalloc(size, GFP_KERNEL))) {
                 EC_MASTER_ERR(master, "Failed to allocate %u bytes"
                         " of slave memory!\n", size);
                 master->slave_count = 0; // TODO avoid retrying scan!
@@ -577,6 +579,7 @@
 
         fsm->slave = master->slaves; // begin with first slave
         ec_fsm_master_enter_write_system_times(fsm);
+        return;
     }
 
     // Does the slave have to be configured?