Skip to content

Commit

Permalink
iwlwifi: fix error path of iwl_rfkill_init
Browse files Browse the repository at this point in the history
This patch cleans rfkill error path. The problem was result of removing
the input device

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Jul 8, 2008
1 parent 9bb8582 commit 8fa7425
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/net/wireless/iwlwifi/iwl-rfkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,13 @@ int iwl_rfkill_init(struct iwl_priv *priv)
ret = rfkill_register(priv->rfkill_mngr.rfkill);
if (ret) {
IWL_ERROR("Unable to register rfkill: %d\n", ret);
goto unregister_rfkill;
goto free_rfkill;
}

IWL_DEBUG_RF_KILL("RFKILL initialization complete.\n");
return ret;

unregister_rfkill:
rfkill_unregister(priv->rfkill_mngr.rfkill);
priv->rfkill_mngr.rfkill = NULL;

freed_rfkill:
free_rfkill:
if (priv->rfkill_mngr.rfkill != NULL)
rfkill_free(priv->rfkill_mngr.rfkill);
priv->rfkill_mngr.rfkill = NULL;
Expand Down

0 comments on commit 8fa7425

Please sign in to comment.