summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-13 10:35:29 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-08-13 19:19:31 -0700
commit22322c474551c208625d3b95ffba39b1882fa645 (patch)
tree5a188a6a2bbd9fec9e3dd9f6976ac70c7ce794b6 /drivers/staging/greybus/connection.c
parentd65e3a22aa3ef28f068cdc38ac82f3e1914cde9a (diff)
downloadlinux-stable-22322c474551c208625d3b95ffba39b1882fa645.tar.gz
linux-stable-22322c474551c208625d3b95ffba39b1882fa645.tar.bz2
linux-stable-22322c474551c208625d3b95ffba39b1882fa645.zip
greybus: connection: Destroy wq on failure
Need to destroy the wq created earlier, do it. Fixes: d0f1778a6b67 ("greybus/connection: add a timestamp kfifo to track connection handoff") Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 27b64d6c8f2e..d0f499d509ba 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -252,7 +252,7 @@ gb_connection_create_range(struct greybus_host_device *hd,
if (kfifo_alloc(&connection->ts_kfifo, GB_CONNECTION_TS_KFIFO_LEN,
GFP_KERNEL))
- goto err_free_connection;
+ goto err_destroy_wq;
connection->dev.parent = parent;
connection->dev.bus = &greybus_bus_type;
@@ -298,6 +298,8 @@ gb_connection_create_range(struct greybus_host_device *hd,
err_free_kfifo:
kfifo_free(&connection->ts_kfifo);
+err_destroy_wq:
+ destroy_workqueue(connection->wq);
err_free_connection:
kfree(connection);
err_remove_ida: