summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/11n.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2017-10-03 20:49:43 +0530
committerKalle Valo <kvalo@codeaurora.org>2017-10-13 12:38:02 +0300
commit40351051d022762d95142a5a9e37220dbbce39f5 (patch)
treee23d0f60589ac86124f45a578547738f7a3e971d /drivers/net/wireless/marvell/mwifiex/11n.c
parent0f0a0af826260a267d11a66e4b13543784bc9c56 (diff)
mwifiex: kill useless list_empty checks
There's absolutely no reason to check to see if a list is empty before iterating through it. It's just like writing code like this: if (count != 0) { for (i = 0; i < count; i++) { ... } } The loop will already be avoided if "count == 0" so there was no reason to check. Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/11n.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/11n.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c
index 725206914911..8772e3949327 100644
--- a/drivers/net/wireless/marvell/mwifiex/11n.c
+++ b/drivers/net/wireless/marvell/mwifiex/11n.c
@@ -658,12 +658,6 @@ void mwifiex_11n_delba(struct mwifiex_private *priv, int tid)
unsigned long flags;
spin_lock_irqsave(&priv->rx_reorder_tbl_lock, flags);
- if (list_empty(&priv->rx_reorder_tbl_ptr)) {
- dev_dbg(priv->adapter->dev,
- "mwifiex_11n_delba: rx_reorder_tbl_ptr empty\n");
- goto exit;
- }
-
list_for_each_entry(rx_reor_tbl_ptr, &priv->rx_reorder_tbl_ptr, list) {
if (rx_reor_tbl_ptr->tid == tid) {
dev_dbg(priv->adapter->dev,
@@ -854,9 +848,6 @@ mwifiex_send_delba_txbastream_tbl(struct mwifiex_private *priv, u8 tid)
struct mwifiex_adapter *adapter = priv->adapter;
struct mwifiex_tx_ba_stream_tbl *tx_ba_stream_tbl_ptr;
- if (list_empty(&priv->tx_ba_stream_tbl_ptr))
- return;
-
list_for_each_entry(tx_ba_stream_tbl_ptr,
&priv->tx_ba_stream_tbl_ptr, list) {
if (tx_ba_stream_tbl_ptr->ba_status == BA_SETUP_COMPLETE) {