OSDN Git Service

iwlwifi: pcie: check iwl_pcie_txq_build_tfd() return value
authorJohannes Berg <johannes.berg@intel.com>
Mon, 18 Jun 2018 07:53:36 +0000 (09:53 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Sat, 6 Oct 2018 07:25:51 +0000 (10:25 +0300)
commit6e00a2376fb7d9974fa8ef791aabdca5314b91d3
tree0f04f52b072c3bf38f040dbff78f5c2b60d7361a
parente00b7b8b91856215743f4e65ac199b41c2e2a3cb
iwlwifi: pcie: check iwl_pcie_txq_build_tfd() return value

If we use the iwl_pcie_txq_build_tfd() return value for BIT(),
we should validate that it's not going to be negative, so do
the check and bail out if we hit an error. We shouldn't, as
we check if it'll fit beforehand, but better be safe.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/tx.c