diff options
author | Douglas Anderson <dianders@chromium.org> | 2017-10-03 18:19:43 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-10-13 12:38:02 +0300 |
commit | 40351051d022762d95142a5a9e37220dbbce39f5 (patch) | |
tree | e23d0f60589ac86124f45a578547738f7a3e971d /drivers/net/wireless/marvell/mwifiex/tdls.c | |
parent | 0f0a0af826260a267d11a66e4b13543784bc9c56 (diff) | |
download | linux-40351051d022762d95142a5a9e37220dbbce39f5.tar.xz |
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/tdls.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/tdls.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c index e76af2866a19..9fe0bae957b7 100644 --- a/drivers/net/wireless/marvell/mwifiex/tdls.c +++ b/drivers/net/wireless/marvell/mwifiex/tdls.c @@ -1413,13 +1413,6 @@ void mwifiex_check_auto_tdls(unsigned long context) priv->check_tdls_tx = false; - if (list_empty(&priv->auto_tdls_list)) { - mod_timer(&priv->auto_tdls_timer, - jiffies + - msecs_to_jiffies(MWIFIEX_TIMER_10S)); - return; - } - spin_lock_irqsave(&priv->auto_tdls_lock, flags); list_for_each_entry(tdls_peer, &priv->auto_tdls_list, list) { if ((jiffies - tdls_peer->rssi_jiffies) > |