aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
diff options
context:
space:
mode:
authorDafna Hirschfeld <dafna3@gmail.com>2018-02-22 09:10:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 14:53:05 +0100
commit1646ff6c6618b04929823f8bfe9b3e505e28fe0e (patch)
tree9e497bb1088e8d26a7c2ea044d01a655b6f88b87 /drivers/staging/wilc1000
parentstaging: pi433: fix CamelCase for addressFiltering (diff)
downloadlinux-dev-1646ff6c6618b04929823f8bfe9b3e505e28fe0e.tar.xz
linux-dev-1646ff6c6618b04929823f8bfe9b3e505e28fe0e.zip
staging: wilc1000: remove 'if' on field address
Remove 'if' statements testing struct's field address. Since such statements always return true, they are redundant. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000')
-rw-r--r--drivers/staging/wilc1000/linux_wlan.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index d9725efe0537..cf746f2462cd 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -628,8 +628,7 @@ void wilc1000_wlan_deinit(struct net_device *dev)
wl->hif_func->disable_interrupt(wl);
mutex_unlock(&wl->hif_cs);
}
- if (&wl->txq_event)
- complete(&wl->txq_event);
+ complete(&wl->txq_event);
wlan_deinitialize_threads(dev);
deinit_irq(dev);
@@ -677,11 +676,8 @@ static int wlan_deinit_locks(struct net_device *dev)
vif = netdev_priv(dev);
wilc = vif->wilc;
- if (&wilc->hif_cs)
- mutex_destroy(&wilc->hif_cs);
-
- if (&wilc->rxq_cs)
- mutex_destroy(&wilc->rxq_cs);
+ mutex_destroy(&wilc->hif_cs);
+ mutex_destroy(&wilc->rxq_cs);
return 0;
}
@@ -716,8 +712,7 @@ static void wlan_deinitialize_threads(struct net_device *dev)
wl->close = 1;
- if (&wl->txq_event)
- complete(&wl->txq_event);
+ complete(&wl->txq_event);
if (wl->txq_thread) {
kthread_stop(wl->txq_thread);