aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-03 14:55:33 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-03 14:55:33 +0200
commit905839bff398d8ce6d050ee766413fa0c7b5d02c (patch)
tree01f377b6cf47772dd53ae87ae39b1c8b2011f03a /src/device.c
parentglobal: use _WG prefix for include guards (diff)
downloadwireguard-monolithic-historical-905839bff398d8ce6d050ee766413fa0c7b5d02c.tar.xz
wireguard-monolithic-historical-905839bff398d8ce6d050ee766413fa0c7b5d02c.zip
global: add space around variable declarations
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 1868027..fdade83 100644
--- a/src/device.c
+++ b/src/device.c
@@ -81,7 +81,6 @@ static int suspending_clear_noise_peers(struct notifier_block *nb, unsigned long
}
rtnl_unlock();
rcu_barrier_bh();
-
return 0;
}
static struct notifier_block clear_peers_on_suspend = { .notifier_call = suspending_clear_noise_peers };
@@ -91,6 +90,7 @@ static int stop(struct net_device *dev)
{
struct wireguard_device *wg = netdev_priv(dev);
struct wireguard_peer *peer, *temp;
+
peer_for_each (wg, peer, temp, true) {
skb_queue_purge(&peer->staged_packet_queue);
timers_stop(peer);
@@ -348,6 +348,7 @@ int __init device_init(void)
{
#ifdef CONFIG_PM_SLEEP
int ret = register_pm_notifier(&clear_peers_on_suspend);
+
if (ret)
return ret;
#endif