diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rfkill.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rfkill.c b/drivers/net/wireless/iwlwifi/iwl-rfkill.c index aa9f31eadab2..eebaf43f66b2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rfkill.c +++ b/drivers/net/wireless/iwlwifi/iwl-rfkill.c | |||
@@ -101,17 +101,13 @@ int iwl_rfkill_init(struct iwl_priv *priv) | |||
101 | ret = rfkill_register(priv->rfkill_mngr.rfkill); | 101 | ret = rfkill_register(priv->rfkill_mngr.rfkill); |
102 | if (ret) { | 102 | if (ret) { |
103 | IWL_ERROR("Unable to register rfkill: %d\n", ret); | 103 | IWL_ERROR("Unable to register rfkill: %d\n", ret); |
104 | goto unregister_rfkill; | 104 | goto free_rfkill; |
105 | } | 105 | } |
106 | 106 | ||
107 | IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n"); | 107 | IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n"); |
108 | return ret; | 108 | return ret; |
109 | 109 | ||
110 | unregister_rfkill: | 110 | free_rfkill: |
111 | rfkill_unregister(priv->rfkill_mngr.rfkill); | ||
112 | priv->rfkill_mngr.rfkill = NULL; | ||
113 | |||
114 | freed_rfkill: | ||
115 | if (priv->rfkill_mngr.rfkill != NULL) | 111 | if (priv->rfkill_mngr.rfkill != NULL) |
116 | rfkill_free(priv->rfkill_mngr.rfkill); | 112 | rfkill_free(priv->rfkill_mngr.rfkill); |
117 | priv->rfkill_mngr.rfkill = NULL; | 113 | priv->rfkill_mngr.rfkill = NULL; |