We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96ea652 commit dfc881aCopy full SHA for dfc881a
drivers/misc/rpmb-core.c
@@ -64,7 +64,7 @@ static void rpmb_dev_release(struct device *dev)
64
struct rpmb_dev *rdev = to_rpmb_dev(dev);
65
66
mutex_lock(&rpmb_mutex);
67
- ida_simple_remove(&rpmb_ida, rdev->id);
+ ida_free(&rpmb_ida, rdev->id);
68
mutex_unlock(&rpmb_mutex);
69
kfree(rdev->descr.dev_id);
70
kfree(rdev);
@@ -176,7 +176,7 @@ struct rpmb_dev *rpmb_dev_register(struct device *dev,
176
}
177
178
179
- ret = ida_simple_get(&rpmb_ida, 0, 0, GFP_KERNEL);
+ ret = ida_alloc(&rpmb_ida, GFP_KERNEL);
180
181
if (ret < 0)
182
goto err_free_dev_id;
0 commit comments