diff options
author | John W. Linville | 2013-11-08 09:03:10 -0500 |
---|---|---|
committer | John W. Linville | 2013-11-08 09:03:10 -0500 |
commit | c1f3bb6bd317994beb3af7bbec4bf54ed0035509 (patch) | |
tree | 878833c714ddcb35f1574f2b11e1f69d1130d206 /drivers/net/wireless/iwlwifi/dvm | |
parent | dcd607718385d02ce3741de225927a57f528f93b (diff) | |
parent | 3c57e865cfb2dcbb48fdfa08e7d4e3479e9b40f0 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/ucode.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c index 86270b69cd02..63637949a146 100644 --- a/drivers/net/wireless/iwlwifi/dvm/ucode.c +++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c @@ -330,15 +330,14 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv, enum iwl_ucode_type old_type; static const u8 alive_cmd[] = { REPLY_ALIVE }; - old_type = priv->cur_ucode; - priv->cur_ucode = ucode_type; fw = iwl_get_ucode_image(priv, ucode_type); + if (WARN_ON(!fw)) + return -EINVAL; + old_type = priv->cur_ucode; + priv->cur_ucode = ucode_type; priv->ucode_loaded = false; - if (!fw) - return -EINVAL; - iwl_init_notification_wait(&priv->notif_wait, &alive_wait, alive_cmd, ARRAY_SIZE(alive_cmd), iwl_alive_fn, &alive_data); |