From fe166c6a2b9225d71b1b4f1035603e189f6c3640 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@google.com> Date: Mon, 27 Jul 2015 14:23:44 -0700 Subject: [PATCH] greybus: core: clean up ida memory for host controller We forgot to free any ida internal structures that were used by this host controller structure when we free the memory for the controller. So fix that up by doing so in the release function. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/staging/greybus/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 49a28ba532dcd..7d5cd99157f57 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -161,6 +161,7 @@ static void free_hd(struct kref *kref) hd = container_of(kref, struct greybus_host_device, kref); + ida_destroy(&hd->cport_id_map); kfree(hd); mutex_unlock(&hd_mutex); } -- 2.30.2