From 5f3e0d17a3938ee253b6e6b7d16033121645b3a4 Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Mon, 14 Sep 2015 10:48:41 +0100 Subject: [PATCH] greybus: loopback: exit kfree after mutex release init doesn't have a lock for kzalloc so exit shouldn't have lock with the corresponding kfree. Signed-off-by: Bryan O'Donoghue Reviewed-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 7e1f527e3aef..745490af7e47 100644 --- a/drivers/staging/greybus/loopback.c +++ b/drivers/staging/greybus/loopback.c @@ -955,8 +955,8 @@ static void gb_loopback_connection_exit(struct gb_connection *connection) sysfs_remove_groups(&connection->dev.kobj, loopback_con_groups); debugfs_remove(gb->file); list_del(&gb->entry); - kfree(gb); mutex_unlock(&gb_dev.mutex); + kfree(gb); } static struct gb_protocol loopback_protocol = { -- 2.20.1