Commit 8fa7425c authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville

iwlwifi: fix error path of iwl_rfkill_init

This patch cleans rfkill error path. The problem was result of removing
the input device
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 9bb8582e
...@@ -101,17 +101,13 @@ int iwl_rfkill_init(struct iwl_priv *priv) ...@@ -101,17 +101,13 @@ int iwl_rfkill_init(struct iwl_priv *priv)
ret = rfkill_register(priv->rfkill_mngr.rfkill); ret = rfkill_register(priv->rfkill_mngr.rfkill);
if (ret) { if (ret) {
IWL_ERROR("Unable to register rfkill: %d\n", ret); IWL_ERROR("Unable to register rfkill: %d\n", ret);
goto unregister_rfkill; goto free_rfkill;
} }
IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n"); IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n");
return ret; return ret;
unregister_rfkill: free_rfkill:
rfkill_unregister(priv->rfkill_mngr.rfkill);
priv->rfkill_mngr.rfkill = NULL;
freed_rfkill:
if (priv->rfkill_mngr.rfkill != NULL) if (priv->rfkill_mngr.rfkill != NULL)
rfkill_free(priv->rfkill_mngr.rfkill); rfkill_free(priv->rfkill_mngr.rfkill);
priv->rfkill_mngr.rfkill = NULL; priv->rfkill_mngr.rfkill = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment