From: Li Heng <liheng40@huawei.com>
To: <johan@kernel.org>, <elder@kernel.org>, <gregkh@linuxfoundation.org>
Cc: <viresh.kumar@linaro.org>, <greybus-dev@lists.linaro.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] svc: add missed destroy_workqueue when gb_svc_create fails
Date: Sat, 25 Jul 2020 11:06:37 +0800 [thread overview]
Message-ID: <1595646397-53868-1-git-send-email-liheng40@huawei.com> (raw)
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
next reply other threads:[~2020-07-25 3:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-25 3:06 Li Heng [this message]
2020-07-25 7:29 ` [PATCH] svc: add missed destroy_workqueue when gb_svc_create fails Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1595646397-53868-1-git-send-email-liheng40@huawei.com \
--to=liheng40@huawei.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.