c
if (!mem) {
    printk(KERN_ERR "mem is NULL\n");
    return -EINVAL;
}
spin_lock_init(&mem->lock);
