]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/srcu.c
[ARM] 4603/1: KS8695: debugfs interface to view pin state
[linux-2.6-omap-h63xx.git] / kernel / srcu.c
index 7e1979f624ba57c904c706855c04fd64ed625b49..3507cabe963bd453857b68f6bf56b59103d0781d 100644 (file)
  * to any other function.  Each srcu_struct represents a separate domain
  * of SRCU protection.
  */
-void init_srcu_struct(struct srcu_struct *sp)
+int init_srcu_struct(struct srcu_struct *sp)
 {
        sp->completed = 0;
-       sp->per_cpu_ref = alloc_percpu(struct srcu_struct_array);
        mutex_init(&sp->mutex);
+       sp->per_cpu_ref = alloc_percpu(struct srcu_struct_array);
+       return (sp->per_cpu_ref ? 0 : -ENOMEM);
 }
 
 /*