summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/vibrator.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-07-08 10:44:09 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-07-08 11:53:43 -0700
commit5c1ac6945526c76258869c8c04632ab5ae61bdab (patch)
treeee38c1643a729fba6d4e314526944b38d31f9f53 /drivers/staging/greybus/vibrator.c
parent6ceb8fdeaec665642de944ee47d11440e72a5e26 (diff)
downloadop-kernel-dev-5c1ac6945526c76258869c8c04632ab5ae61bdab.zip
op-kernel-dev-5c1ac6945526c76258869c8c04632ab5ae61bdab.tar.gz
greybus: properly cleanup ida and idr structures when shutting down
idr and ida structures have internal memory allocated that needs to be freed when modules are removed. So call the proper idr_destroy() or ida_destroy() functions on the module exit path to free the memory. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/vibrator.c')
-rw-r--r--drivers/staging/greybus/vibrator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 20f09bb..62b3552 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -190,6 +190,7 @@ static __exit void protocol_exit(void)
{
gb_protocol_deregister(&vibrator_protocol);
class_unregister(&vibrator_class);
+ ida_destroy(&minors);
}
module_exit(protocol_exit);
OpenPOWER on IntegriCloud