iwlwifi: queue: don't crash if txq->entries is NULL
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Fri, 15 Jan 2021 11:05:53 +0000 (13:05 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 25 Jan 2021 13:53:02 +0000 (15:53 +0200)
commit0f8d5656b3fd100c132b02aa72038f032fc6e30e
tree11f1cfb3a0d8c9e9620e2964d01c01e71b66ac55
parenta800f95858d02a9174c48b4286c0799d3905890f
iwlwifi: queue: don't crash if txq->entries is NULL

The code was really awkward, we would first dereference
txq->entries when calling iwl_txq_genX_tfd_unmap and then
we would check that txq->entries is non-NULL.
Fix that by exiting if txq->entries is NULL.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210115130252.173359fc236d.I75c7c2397d20df8d7fbc24cb16a5232d5c551889@changeid
drivers/net/wireless/intel/iwlwifi/queue/tx.c