Merge tag 'v5.18' into rdma.git for-next
[linux-2.6-microblaze.git] / lib / percpu-refcount.c
index af93021..e5c5315 100644 (file)
@@ -76,6 +76,7 @@ int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release,
        data = kzalloc(sizeof(*ref->data), gfp);
        if (!data) {
                free_percpu((void __percpu *)ref->percpu_count_ptr);
+               ref->percpu_count_ptr = 0;
                return -ENOMEM;
        }