iwlwifi: remove unnecessary parameter in scan function
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Tue, 23 Feb 2010 22:36:13 +0000 (14:36 -0800)
committerReinette Chatre <reinette.chatre@intel.com>
Wed, 10 Mar 2010 00:12:47 +0000 (16:12 -0800)
small change to remove unnecessary "ret" parameter since it not being
used.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-scan.c

index ccad04c0a767ea1b10bb1f625b401437ae2d828a..1544d751a42e63ebc77ce155e29c565ea48b0557 100644 (file)
@@ -675,7 +675,6 @@ static void iwl_bg_request_scan(struct work_struct *data)
        };
        struct iwl_scan_cmd *scan;
        struct ieee80211_conf *conf = NULL;
-       int ret = 0;
        u32 rate_flags = 0;
        u16 cmd_len;
        u16 rx_chain = 0;
@@ -708,7 +707,6 @@ static void iwl_bg_request_scan(struct work_struct *data)
        if (test_bit(STATUS_SCAN_HW, &priv->status)) {
                IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests in parallel. "
                               "Ignoring second request.\n");
-               ret = -EIO;
                goto done;
        }
 
@@ -741,7 +739,8 @@ static void iwl_bg_request_scan(struct work_struct *data)
                priv->scan = kmalloc(sizeof(struct iwl_scan_cmd) +
                                     IWL_MAX_SCAN_SIZE, GFP_KERNEL);
                if (!priv->scan) {
-                       ret = -ENOMEM;
+                       IWL_DEBUG_SCAN(priv,
+                                      "fail to allocate memory for scan\n");
                        goto done;
                }
        }
@@ -908,8 +907,7 @@ static void iwl_bg_request_scan(struct work_struct *data)
        scan->len = cpu_to_le16(cmd.len);
 
        set_bit(STATUS_SCAN_HW, &priv->status);
-       ret = iwl_send_cmd_sync(priv, &cmd);
-       if (ret)
+       if (iwl_send_cmd_sync(priv, &cmd))
                goto done;
 
        queue_delayed_work(priv->workqueue, &priv->scan_check,