aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/main.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/main.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c
index 7f56c06a53db..930056b013f3 100644
--- a/drivers/net/wireless/iwmc3200wifi/main.c
+++ b/drivers/net/wireless/iwmc3200wifi/main.c
@@ -643,19 +643,10 @@ int __iwm_up(struct iwm_priv *iwm)
643 } 643 }
644 } 644 }
645 645
646 iwm->umac_profile = kmalloc(sizeof(struct iwm_umac_profile),
647 GFP_KERNEL);
648 if (!iwm->umac_profile) {
649 IWM_ERR(iwm, "Couldn't alloc memory for profile\n");
650 goto err_fw;
651 }
652
653 iwm_init_default_profile(iwm, iwm->umac_profile);
654
655 ret = iwm_channels_init(iwm); 646 ret = iwm_channels_init(iwm);
656 if (ret < 0) { 647 if (ret < 0) {
657 IWM_ERR(iwm, "Couldn't init channels\n"); 648 IWM_ERR(iwm, "Couldn't init channels\n");
658 goto err_profile; 649 goto err_fw;
659 } 650 }
660 651
661 /* Set the READY bit to indicate interface is brought up successfully */ 652 /* Set the READY bit to indicate interface is brought up successfully */
@@ -663,10 +654,6 @@ int __iwm_up(struct iwm_priv *iwm)
663 654
664 return 0; 655 return 0;
665 656
666 err_profile:
667 kfree(iwm->umac_profile);
668 iwm->umac_profile = NULL;
669
670 err_fw: 657 err_fw:
671 iwm_eeprom_exit(iwm); 658 iwm_eeprom_exit(iwm);
672 659
@@ -705,10 +692,9 @@ int __iwm_down(struct iwm_priv *iwm)
705 clear_bit(IWM_STATUS_READY, &iwm->status); 692 clear_bit(IWM_STATUS_READY, &iwm->status);
706 693
707 iwm_eeprom_exit(iwm); 694 iwm_eeprom_exit(iwm);
708 kfree(iwm->umac_profile);
709 iwm->umac_profile = NULL;
710 iwm_bss_list_clean(iwm); 695 iwm_bss_list_clean(iwm);
711 696 iwm_init_default_profile(iwm, iwm->umac_profile);
697 iwm->umac_profile_active = false;
712 iwm->default_key = -1; 698 iwm->default_key = -1;
713 iwm->core_enabled = 0; 699 iwm->core_enabled = 0;
714 700