aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/srcu.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/srcu.c')
-rw-r--r--kernel/srcu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/srcu.c b/kernel/srcu.c
index 7e1979f624b..3507cabe963 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -42,11 +42,12 @@
42 * to any other function. Each srcu_struct represents a separate domain 42 * to any other function. Each srcu_struct represents a separate domain
43 * of SRCU protection. 43 * of SRCU protection.
44 */ 44 */
45void init_srcu_struct(struct srcu_struct *sp) 45int init_srcu_struct(struct srcu_struct *sp)
46{ 46{
47 sp->completed = 0; 47 sp->completed = 0;
48 sp->per_cpu_ref = alloc_percpu(struct srcu_struct_array);
49 mutex_init(&sp->mutex); 48 mutex_init(&sp->mutex);
49 sp->per_cpu_ref = alloc_percpu(struct srcu_struct_array);
50 return (sp->per_cpu_ref ? 0 : -ENOMEM);
50} 51}
51 52
52/* 53/*