aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/scan.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-05-03 23:11:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-05 14:59:16 -0400
commit270e58e8898c8be40451ebee45b6c9b5bd5db04b (patch)
tree4dd71a0e18a3f5528af59fcaebc61d98377792e5 /drivers/net/wireless/mwifiex/scan.c
parent57f16b5da03784d1660133fbec7281ea5735da69 (diff)
mwifiex: remove unnecessary variable initialization
Skip initialization of local variables with some default values if the values are not going to be used further down the code path. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/scan.c')
-rw-r--r--drivers/net/wireless/mwifiex/scan.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 31a529578805..4968974f3427 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -117,8 +117,8 @@ mwifiex_search_oui_in_ie(struct ie_body *iebody, u8 *oui)
117static u8 117static u8
118mwifiex_is_rsn_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher) 118mwifiex_is_rsn_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)
119{ 119{
120 u8 *oui = NULL; 120 u8 *oui;
121 struct ie_body *iebody = NULL; 121 struct ie_body *iebody;
122 u8 ret = MWIFIEX_OUI_NOT_PRESENT; 122 u8 ret = MWIFIEX_OUI_NOT_PRESENT;
123 123
124 if (((bss_desc->bcn_rsn_ie) && ((*(bss_desc->bcn_rsn_ie)). 124 if (((bss_desc->bcn_rsn_ie) && ((*(bss_desc->bcn_rsn_ie)).
@@ -144,8 +144,8 @@ mwifiex_is_rsn_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)
144static u8 144static u8
145mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher) 145mwifiex_is_wpa_oui_present(struct mwifiex_bssdescriptor *bss_desc, u32 cipher)
146{ 146{
147 u8 *oui = NULL; 147 u8 *oui;
148 struct ie_body *iebody = NULL; 148 struct ie_body *iebody;
149 u8 ret = MWIFIEX_OUI_NOT_PRESENT; 149 u8 ret = MWIFIEX_OUI_NOT_PRESENT;
150 150
151 if (((bss_desc->bcn_wpa_ie) && ((*(bss_desc->bcn_wpa_ie)). 151 if (((bss_desc->bcn_wpa_ie) && ((*(bss_desc->bcn_wpa_ie)).
@@ -181,7 +181,7 @@ int mwifiex_find_best_bss(struct mwifiex_private *priv,
181 struct mwifiex_ssid_bssid *ssid_bssid) 181 struct mwifiex_ssid_bssid *ssid_bssid)
182{ 182{
183 struct mwifiex_ssid_bssid tmp_ssid_bssid; 183 struct mwifiex_ssid_bssid tmp_ssid_bssid;
184 u8 *mac = NULL; 184 u8 *mac;
185 185
186 if (!ssid_bssid) 186 if (!ssid_bssid)
187 return -1; 187 return -1;
@@ -213,7 +213,7 @@ int mwifiex_find_best_bss(struct mwifiex_private *priv,
213int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv, 213int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
214 struct mwifiex_user_scan_cfg *scan_req) 214 struct mwifiex_user_scan_cfg *scan_req)
215{ 215{
216 int status = 0; 216 int status;
217 217
218 priv->adapter->cmd_wait_q.condition = false; 218 priv->adapter->cmd_wait_q.condition = false;
219 219
@@ -2253,8 +2253,8 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
2253{ 2253{
2254 int ret = 0; 2254 int ret = 0;
2255 struct mwifiex_adapter *adapter = priv->adapter; 2255 struct mwifiex_adapter *adapter = priv->adapter;
2256 struct cmd_ctrl_node *cmd_node = NULL; 2256 struct cmd_ctrl_node *cmd_node;
2257 union mwifiex_scan_cmd_config_tlv *scan_cfg_out = NULL; 2257 union mwifiex_scan_cmd_config_tlv *scan_cfg_out;
2258 struct mwifiex_ie_types_chan_list_param_set *chan_list_out; 2258 struct mwifiex_ie_types_chan_list_param_set *chan_list_out;
2259 u32 buf_size; 2259 u32 buf_size;
2260 struct mwifiex_chan_scan_param_set *scan_chan_list; 2260 struct mwifiex_chan_scan_param_set *scan_chan_list;
@@ -2404,8 +2404,8 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
2404{ 2404{
2405 int ret = 0; 2405 int ret = 0;
2406 struct mwifiex_adapter *adapter = priv->adapter; 2406 struct mwifiex_adapter *adapter = priv->adapter;
2407 struct cmd_ctrl_node *cmd_node = NULL; 2407 struct cmd_ctrl_node *cmd_node;
2408 struct host_cmd_ds_802_11_scan_rsp *scan_rsp = NULL; 2408 struct host_cmd_ds_802_11_scan_rsp *scan_rsp;
2409 struct mwifiex_bssdescriptor *bss_new_entry = NULL; 2409 struct mwifiex_bssdescriptor *bss_new_entry = NULL;
2410 struct mwifiex_ie_types_data *tlv_data; 2410 struct mwifiex_ie_types_data *tlv_data;
2411 struct mwifiex_ie_types_tsf_timestamp *tsf_tlv; 2411 struct mwifiex_ie_types_tsf_timestamp *tsf_tlv;
@@ -2906,7 +2906,7 @@ static int mwifiex_scan_specific_ssid(struct mwifiex_private *priv,
2906int mwifiex_request_scan(struct mwifiex_private *priv, 2906int mwifiex_request_scan(struct mwifiex_private *priv,
2907 struct mwifiex_802_11_ssid *req_ssid) 2907 struct mwifiex_802_11_ssid *req_ssid)
2908{ 2908{
2909 int ret = 0; 2909 int ret;
2910 2910
2911 if (down_interruptible(&priv->async_sem)) { 2911 if (down_interruptible(&priv->async_sem)) {
2912 dev_err(priv->adapter->dev, "%s: acquire semaphore\n", 2912 dev_err(priv->adapter->dev, "%s: acquire semaphore\n",