# HG changeset patch
# User Florian Pose <fp@igh-essen.com>
# Date 1316703174 -7200
# Node ID 7dd86c484192ab87f8f0264b61af85dd6acfdba1
# Parent  79d44885021f2c8186205f30850b12962bfa946a
Fixed missing return causing slaves not going to OP.

diff -r 79d44885021f -r 7dd86c484192 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?