diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index ccad04c0a76..1544d751a42 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -675,7 +675,6 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
675 | }; | 675 | }; |
676 | struct iwl_scan_cmd *scan; | 676 | struct iwl_scan_cmd *scan; |
677 | struct ieee80211_conf *conf = NULL; | 677 | struct ieee80211_conf *conf = NULL; |
678 | int ret = 0; | ||
679 | u32 rate_flags = 0; | 678 | u32 rate_flags = 0; |
680 | u16 cmd_len; | 679 | u16 cmd_len; |
681 | u16 rx_chain = 0; | 680 | u16 rx_chain = 0; |
@@ -708,7 +707,6 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
708 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { | 707 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { |
709 | IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests in parallel. " | 708 | IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests in parallel. " |
710 | "Ignoring second request.\n"); | 709 | "Ignoring second request.\n"); |
711 | ret = -EIO; | ||
712 | goto done; | 710 | goto done; |
713 | } | 711 | } |
714 | 712 | ||
@@ -741,7 +739,8 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
741 | priv->scan = kmalloc(sizeof(struct iwl_scan_cmd) + | 739 | priv->scan = kmalloc(sizeof(struct iwl_scan_cmd) + |
742 | IWL_MAX_SCAN_SIZE, GFP_KERNEL); | 740 | IWL_MAX_SCAN_SIZE, GFP_KERNEL); |
743 | if (!priv->scan) { | 741 | if (!priv->scan) { |
744 | ret = -ENOMEM; | 742 | IWL_DEBUG_SCAN(priv, |
743 | "fail to allocate memory for scan\n"); | ||
745 | goto done; | 744 | goto done; |
746 | } | 745 | } |
747 | } | 746 | } |
@@ -908,8 +907,7 @@ static void iwl_bg_request_scan(struct work_struct *data) | |||
908 | scan->len = cpu_to_le16(cmd.len); | 907 | scan->len = cpu_to_le16(cmd.len); |
909 | 908 | ||
910 | set_bit(STATUS_SCAN_HW, &priv->status); | 909 | set_bit(STATUS_SCAN_HW, &priv->status); |
911 | ret = iwl_send_cmd_sync(priv, &cmd); | 910 | if (iwl_send_cmd_sync(priv, &cmd)) |
912 | if (ret) | ||
913 | goto done; | 911 | goto done; |
914 | 912 | ||
915 | queue_delayed_work(priv->workqueue, &priv->scan_check, | 913 | queue_delayed_work(priv->workqueue, &priv->scan_check, |