Minor change.
authorFlorian Pose <fp@igh-essen.com>
Thu, 12 Jun 2008 13:03:50 +0000
changeset 1005 5af7ab9a98b1
parent 1004 990b89d8ad03
child 1006 90db4c3de57b
Minor change.
master/fsm_master.c
--- a/master/fsm_master.c	Thu Jun 12 13:00:32 2008 +0000
+++ b/master/fsm_master.c	Thu Jun 12 13:03:50 2008 +0000
@@ -183,7 +183,7 @@
         )
 {
     ec_datagram_t *datagram = fsm->datagram;
-    unsigned int i;
+    unsigned int i, size;
     ec_slave_t *slave;
     ec_master_t *master = fsm->master;
 
@@ -241,10 +241,10 @@
                 return;
             }
 
-            if (!(master->slaves = (ec_slave_t *)
-                        kmalloc(sizeof(ec_slave_t) * master->slave_count,
-                            GFP_KERNEL))) {
-                EC_ERR("Failed to allocate slave memory!\n");
+            size = sizeof(ec_slave_t) * master->slave_count;
+            if (!(master->slaves = (ec_slave_t *) kmalloc(size, GFP_KERNEL))) {
+                EC_ERR("Failed to allocate %u bytes of slave memory!\n",
+                        size);
                 master->slave_count = 0; // FIXME avoid scanning!
                 master->scan_busy = 0;
                 wake_up_interruptible(&master->scan_queue);