From 1ff86791ee8bd031bbdb9198bd9951a2bc60d0fe Mon Sep 17 00:00:00 2001 From: Florian Pose Date: Thu, 18 May 2006 17:49:52 +0000 Subject: [PATCH] Minor changes in module.c --- master/module.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/master/module.c b/master/module.c index 5e705fe2..c9144459 100644 --- a/master/module.c +++ b/master/module.c @@ -250,27 +250,18 @@ ec_device_t *ecdev_register(unsigned int master_index, /**< master index */ { 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 @@ ec_master_t *ecrt_request_master(unsigned int master_index 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);