lkml.org 
[lkml]   [2020]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] svc: add missed destroy_workqueue when gb_svc_create fails
Date
destroy_workqueue() should be called to destroy svc->wq
when gb_svc_create() init resources fails.

Fixes: 8465def499c7 ("staging: greybus: move the greybus core to drivers/greybus")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Li Heng <liheng40@huawei.com>
---
drivers/greybus/svc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
index ce7740e..38f858f 100644
--- a/drivers/greybus/svc.c
+++ b/drivers/greybus/svc.c
@@ -1340,6 +1340,7 @@ struct gb_svc *gb_svc_create(struct gb_host_device *hd)

err_put_device:
put_device(&svc->dev);
+ destroy_workqueue(svc->wq);
return NULL;
}

--
2.7.4
\
 
 \ /
  Last update: 2020-07-25 05:06    [W:0.043 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site