c
index = ida_alloc(&ida_index, GFP_KERNEL);
if (index < 0 || index > INT_MAX / 2) {
    pr_warn("%s: invalid index value!\n", name);
    rc = -EINVAL;
    goto err;
}
