# HG changeset patch # User Florian Pose # Date 1147974592 0 # Node ID ee1d766dbc6b9aa04d52d41d53b5cea3258b8d2c # Parent f5e94773472dcb85cd7ab8b4d0f68cd732553260 Minor changes in module.c diff -r f5e94773472d -r ee1d766dbc6b master/module.c --- a/master/module.c Thu May 18 12:47:01 2006 +0000 +++ b/master/module.c Thu May 18 17:49:52 2006 +0000 @@ -250,27 +250,18 @@ { ec_master_t *master; - if (!net_dev) { - EC_WARN("Device is NULL!\n"); - goto out_return; - } - if (!(master = ec_find_master(master_index))) return NULL; - // critical section start if (master->device) { EC_ERR("Master %i already has a device!\n", master_index); - // critical section leave goto out_return; } if (!(master->device = (ec_device_t *) kmalloc(sizeof(ec_device_t), GFP_KERNEL))) { EC_ERR("Failed to allocate device!\n"); - // critical section leave goto out_return; } - // critical section end if (ec_device_init(master->device, master, net_dev, isr, module)) { EC_ERR("Failed to init device!\n"); @@ -379,13 +370,11 @@ if (!(master = ec_find_master(master_index))) goto out_return; - // begin critical section if (master->reserved) { EC_ERR("Master %i is already in use!\n", master_index); goto out_return; } master->reserved = 1; - // end critical section if (!master->device) { EC_ERR("Master %i has no assigned device!\n", master_index);