greybus: unlock hd mutex on free
When free_hd() is called, hd_mutex is held. It is the
responsibility of free_hd() to drop that mutex.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c
index 6c4107e..6762871 100644
--- a/drivers/staging/greybus/core.c
+++ b/drivers/staging/greybus/core.c
@@ -294,6 +294,7 @@
hd = container_of(kref, struct greybus_host_device, kref);
kfree(hd);
+ mutex_unlock(&hd_mutex);
}
struct greybus_host_device *greybus_create_hd(struct greybus_host_driver *driver,