aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/most/mostcore
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-12-22 10:52:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 17:34:58 -0800
commitb7382d44a530cd8c1bc156ddc123e3f09ae68746 (patch)
tree9eda68502d1ad7939358d4c25dcf919164b216e3 /drivers/staging/most/mostcore
parentstaging: most: remove function destroy_most_c_obj (diff)
downloadlinux-dev-b7382d44a530cd8c1bc156ddc123e3f09ae68746.tar.xz
linux-dev-b7382d44a530cd8c1bc156ddc123e3f09ae68746.zip
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>
Diffstat (limited to 'drivers/staging/most/mostcore')
-rw-r--r--drivers/staging/most/mostcore/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 8be6cdcf4008..995987d352a8 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -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);
}