{
struct adapter *adapter = netdev_priv(dev);
struct sliccard *card = adapter->card;
- u32 locked = 0;
int status;
ASSERT(adapter);
spin_lock_irqsave(&slic_global.driver_lock.lock,
slic_global.driver_lock.flags);
- locked = 1;
if (!adapter->activated) {
card->adapters_activated++;
slic_global.num_slic_ports_active++;
slic_global.num_slic_ports_active--;
adapter->activated = 0;
}
- if (locked) {
- spin_unlock_irqrestore(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
- locked = 0;
- }
- return status;
+ goto spin_unlock;
}
if (!card->master)
card->master = adapter;
- if (locked) {
- spin_unlock_irqrestore(&slic_global.driver_lock.lock,
- slic_global.driver_lock.flags);
- locked = 0;
- }
-
- return 0;
+spin_unlock:
+ spin_unlock_irqrestore(&slic_global.driver_lock.lock,
+ slic_global.driver_lock.flags);
+ return status;
}
static void slic_card_cleanup(struct sliccard *card)