]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: silence buffer overflow warning
authorDan Carpenter <error27@gmail.com>
Sat, 9 Jan 2010 08:41:48 +0000 (11:41 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jan 2010 22:26:46 +0000 (17:26 -0500)
commitc625fb67f55d2d10f2599e4bf6b1fe08c61b2a8f
tree9e051be0109261b5bda453f5305e7bf44dd17ae1
parent849313ffb105981b906b0ea7433bff0189459f66
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: Dan Carpenter <error27@gmail.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-4965.c