greybus: unlock hd mutex on free
authorAlex Elder <elder@linaro.org>
Thu, 16 Oct 2014 11:35:26 +0000 (06:35 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 17 Oct 2014 16:11:59 +0000 (18:11 +0200)
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>
drivers/staging/greybus/core.c

index 6c4107e207621fe93f613f8eec1e4117d5a2121f..67628719f8d1f83ac4bba7945846bbefecf0d66e 100644 (file)
@@ -294,6 +294,7 @@ static void free_hd(struct kref *kref)
        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,