Skip to content

Commit

Permalink
iwlwifi: fix notification wait bug
Browse files Browse the repository at this point in the history
In "iwlwifi: consolidate the start_device flow"
Emmanuel added the return if the fw isn't there
but forgot to take into account that the struct
for notification wait needs to be added only
after the check -- fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 7, 2012
1 parent 6794f3e commit f472089
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/iwlwifi/iwl-ucode.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,16 +533,16 @@ int iwl_load_ucode_wait_alive(struct iwl_priv *priv,
int ret;
enum iwl_ucode_type old_type;

iwl_init_notification_wait(priv->shrd, &alive_wait, REPLY_ALIVE,
iwl_alive_fn, &alive_data);

old_type = priv->shrd->ucode_type;
priv->shrd->ucode_type = ucode_type;
fw = iwl_get_ucode_image(priv, ucode_type);

if (!fw)
return -EINVAL;

iwl_init_notification_wait(priv->shrd, &alive_wait, REPLY_ALIVE,
iwl_alive_fn, &alive_data);

ret = iwl_trans_start_fw(trans(priv), fw);
if (ret) {
priv->shrd->ucode_type = old_type;
Expand Down

0 comments on commit f472089

Please sign in to comment.