wireless: iwlwifi: iwl-scan.c: Fix build warning
authorFabio Estevam <festevam@gmail.com>
Mon, 16 Jan 2012 02:47:12 +0000 (00:47 -0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Jan 2012 20:01:16 +0000 (15:01 -0500)
Fix the following build warning:

drivers/net/wireless/iwlwifi/iwl-scan.c: In function ‘iwlagn_request_scan’:
drivers/net/wireless/iwlwifi/iwl-scan.c:572: warning: ‘cmd_len’ may be used uninitialized in this function

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-scan.c

index 084aa2c4ccfb272dab28d57fbc9969644360f314..a6454726737e04b207d0c9ae710098f98cef6c63 100644 (file)
@@ -569,7 +569,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
        struct iwl_scan_cmd *scan;
        struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
        u32 rate_flags = 0;
-       u16 cmd_len;
+       u16 cmd_len = 0;
        u16 rx_chain = 0;
        enum ieee80211_band band;
        u8 n_probes = 0;