From 40351051d022762d95142a5a9e37220dbbce39f5 Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Tue, 3 Oct 2017 20:49:43 +0530 Subject: 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 Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo --- drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c') diff --git a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c index 274dd5a1574a..d87df2dfcfa4 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +++ b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c @@ -835,12 +835,6 @@ void mwifiex_update_rxreor_flags(struct mwifiex_adapter *adapter, u8 flags) continue; spin_lock_irqsave(&priv->rx_reorder_tbl_lock, lock_flags); - if (list_empty(&priv->rx_reorder_tbl_ptr)) { - spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, - lock_flags); - continue; - } - list_for_each_entry(tbl, &priv->rx_reorder_tbl_ptr, list) tbl->flags = flags; spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, lock_flags); -- cgit v1.2.3-59-g8ed1b