mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 00:06:36 +00:00
staging: most: add missing call to ida_simple_remove
This patch adds two missing calls to function ida_simpel_remove. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9ce039a08a
commit
b7382d44a5
1 changed files with 2 additions and 0 deletions
|
@ -1752,6 +1752,7 @@ struct kobject *most_register_interface(struct most_interface *iface)
|
|||
inst = create_most_inst_obj(name);
|
||||
if (!inst) {
|
||||
pr_info("Failed to allocate interface instance\n");
|
||||
ida_simple_remove(&mdev_id, id);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
|
@ -1808,6 +1809,7 @@ struct kobject *most_register_interface(struct most_interface *iface)
|
|||
free_instance:
|
||||
pr_info("Failed allocate channel(s)\n");
|
||||
list_del(&inst->list);
|
||||
ida_simple_remove(&mdev_id, id);
|
||||
destroy_most_inst_obj(inst);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue