iwlwifi: mvm: fix the keyidx assignment
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 5 Feb 2013 08:08:35 +0000 (10:08 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Feb 2013 10:54:27 +0000 (11:54 +0100)
Fixes an issue that smatch pointed out:

  1118
  1119          key_flags = cpu_to_le16(keyconf->keyidx &  STA_KEY_FLG_KEYID_MSK);
                                        ^^^^^^^^^^^^^^^
This is s8.
                                                          ^^^^^^^^^^^^^^^^^^^^^
STA_KEY_FLG_KEYID_MSK is 0x300.

The result after the bitwise AND is always zero because 0xff & 0x300.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

No differences found