c
if (mem) {
    spin_lock_init(&mem->lock);
} else {
    pr_err("Error: mem is NULL\n");
    return -ENOMEM;
}
