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 <bryan.odonoghue@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Bryan O'Donoghue 2015-09-14 10:48:41 +01:00 committed by Greg Kroah-Hartman
parent 29f020290d
commit 5f3e0d17a3

View File

@ -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 = {