All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] svc: add missed destroy_workqueue when gb_svc_create fails
@ 2020-07-25  3:06 Li Heng
  2020-07-25  7:29 ` Johan Hovold
  0 siblings, 1 reply; 2+ messages in thread
From: Li Heng @ 2020-07-25  3:06 UTC (permalink / raw)
  To: johan, elder, gregkh; +Cc: viresh.kumar, greybus-dev, linux-kernel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-25  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25  3:06 [PATCH] svc: add missed destroy_workqueue when gb_svc_create fails Li Heng
2020-07-25  7:29 ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.