Commit 39825f4d authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

iwlwifi: silence buffer overflow warning

Smatch (and presumably other static checkers) complain that MAX_TID_COUNT is
past the end of the array.  In the resulting discussion, Zhu Yi pointed out
that this value is not used in real life and the assignment was only there to
silence a gcc warning.

If there were a bug in the surrounding code and the value were used, the
WARN_ON(!qc) would print a warning before the crash.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c91c3efc
...@@ -1961,7 +1961,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, ...@@ -1961,7 +1961,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
struct iwl4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; struct iwl4965_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
u32 status = le32_to_cpu(tx_resp->u.status); u32 status = le32_to_cpu(tx_resp->u.status);
int tid = MAX_TID_COUNT - 1; int uninitialized_var(tid);
int sta_id; int sta_id;
int freed; int freed;
u8 *qc = NULL; u8 *qc = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment