diff options
Diffstat (limited to 'src/queueing.c')
-rw-r--r-- | src/queueing.c | 2 |
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); |