From: Greg Kroah-Hartman Date: Mon, 27 Jul 2015 21:23:44 +0000 (-0700) Subject: greybus: core: clean up ida memory for host controller X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fe166c6a2b9225d71b1b4f1035603e189f6c3640;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Viresh Kumar --- diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index 49a28ba532dc..7d5cd99157f5 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); }