All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: <yevhen.orlov@plvision.eu>, <tchornyi@marvell.com>,
	<oleksandr.mazur@plvision.eu>, <davem@davemloft.net>
Subject: [PATCH -next] net: marvell: prestera: add missing destroy_workqueue() in prestera_module_init()
Date: Tue, 22 Mar 2022 17:02:36 +0800	[thread overview]
Message-ID: <20220322090236.1439649-1-yangyingliang@huawei.com> (raw)

Add the missing destroy_workqueue() before return from
prestera_module_init() in the error handling case.

Fixes: 4394fbcb78cf ("net: marvell: prestera: handle fib notifications")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
index 1402c7889e78..3952fdcc9240 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
@@ -1032,8 +1032,10 @@ static int __init prestera_module_init(void)
 		return -ENOMEM;
 
 	prestera_owq = alloc_ordered_workqueue("prestera_ordered", 0);
-	if (!prestera_owq)
+	if (!prestera_owq) {
+		destroy_workqueue(prestera_wq);
 		return -ENOMEM;
+	}
 
 	return 0;
 }
-- 
2.25.1


             reply	other threads:[~2022-03-22  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22  9:02 Yang Yingliang [this message]
2022-03-23 17:50 ` [PATCH -next] net: marvell: prestera: add missing destroy_workqueue() in prestera_module_init() patchwork-bot+netdevbpf

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=20220322090236.1439649-1-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oleksandr.mazur@plvision.eu \
    --cc=tchornyi@marvell.com \
    --cc=yevhen.orlov@plvision.eu \
    /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.