diff options
Diffstat (limited to 'drivers/net/wireless/wavelan_cs.c')
-rw-r--r-- | drivers/net/wireless/wavelan_cs.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index 255952d8cea0..196e827fc846 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -4627,8 +4627,7 @@ wavelan_attach(void) | |||
4627 | link->conf.IntType = INT_MEMORY_AND_IO; | 4627 | link->conf.IntType = INT_MEMORY_AND_IO; |
4628 | 4628 | ||
4629 | /* Chain drivers */ | 4629 | /* Chain drivers */ |
4630 | link->next = dev_list; | 4630 | link->next = NULL; |
4631 | dev_list = link; | ||
4632 | 4631 | ||
4633 | /* Allocate the generic data structure */ | 4632 | /* Allocate the generic data structure */ |
4634 | dev = alloc_etherdev(sizeof(net_local)); | 4633 | dev = alloc_etherdev(sizeof(net_local)); |
@@ -4731,27 +4730,6 @@ wavelan_detach(struct pcmcia_device *p_dev) | |||
4731 | wv_pcmcia_release(link); | 4730 | wv_pcmcia_release(link); |
4732 | } | 4731 | } |
4733 | 4732 | ||
4734 | /* Remove the interface data from the linked list */ | ||
4735 | if(dev_list == link) | ||
4736 | dev_list = link->next; | ||
4737 | else | ||
4738 | { | ||
4739 | dev_link_t * prev = dev_list; | ||
4740 | |||
4741 | while((prev != (dev_link_t *) NULL) && (prev->next != link)) | ||
4742 | prev = prev->next; | ||
4743 | |||
4744 | if(prev == (dev_link_t *) NULL) | ||
4745 | { | ||
4746 | #ifdef DEBUG_CONFIG_ERRORS | ||
4747 | printk(KERN_WARNING "wavelan_detach : Attempting to remove a nonexistent device.\n"); | ||
4748 | #endif | ||
4749 | return; | ||
4750 | } | ||
4751 | |||
4752 | prev->next = link->next; | ||
4753 | } | ||
4754 | |||
4755 | /* Free pieces */ | 4733 | /* Free pieces */ |
4756 | if(link->priv) | 4734 | if(link->priv) |
4757 | { | 4735 | { |