Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333992
b: refs/heads/master
c: 061f2e6
h: refs/heads/master
v: v3
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Oct 8, 2012
1 parent 2d91e85 commit cfda6a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2476335313e618c0368ffbe73e05bba4d0f5f89
refs/heads/master: 061f2e69fedbcd7839c8e6e6b659e345acc3396f
16 changes: 10 additions & 6 deletions trunk/drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,8 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
GFP_KERNEL);
if (!scan_cfg_out) {
dev_err(adapter->dev, "failed to alloc scan_cfg_out\n");
return -ENOMEM;
ret = -ENOMEM;
goto done;
}

buf_size = sizeof(struct mwifiex_chan_scan_param_set) *
Expand All @@ -1336,7 +1337,8 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
if (!scan_chan_list) {
dev_err(adapter->dev, "failed to alloc scan_chan_list\n");
kfree(scan_cfg_out);
return -ENOMEM;
ret = -ENOMEM;
goto done;
}

mwifiex_config_scan(priv, user_scan_in, &scan_cfg_out->config,
Expand Down Expand Up @@ -1364,14 +1366,16 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
flags);
}
} else {
spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags);
adapter->scan_processing = true;
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
}

kfree(scan_cfg_out);
kfree(scan_chan_list);
done:
if (ret) {
spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags);
adapter->scan_processing = false;
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
}
return ret;
}

Expand Down

0 comments on commit cfda6a0

Please sign in to comment.