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>
This commit is contained in:
Greg Kroah-Hartman 2015-07-27 14:23:44 -07:00
parent d8742156c1
commit fe166c6a2b

View File

@ -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);
}