aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/queueing.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/queueing.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/queueing.c')
-rw-r--r--src/queueing.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/queueing.c b/src/queueing.c
index dec02ee..2e00d63 100644
--- a/src/queueing.c
+++ b/src/queueing.c
@@ -9,8 +9,10 @@ struct multicore_worker __percpu *packet_alloc_percpu_multicore_worker(work_func
{
int cpu;
struct multicore_worker __percpu *worker = alloc_percpu(struct multicore_worker);
+
if (!worker)
return NULL;
+
for_each_possible_cpu (cpu) {
per_cpu_ptr(worker, cpu)->ptr = ptr;
INIT_WORK(&per_cpu_ptr(worker, cpu)->work, function);