From: jeff.chen_1@nxp.com
To: Abdun Nihaal <abdun.nihaal@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
briannorris@chromium.org, johannes@sipsolutions.net,
francesco@dolcini.it, tsung-hsien.hsieh@nxp.com,
s.hauer@pengutronix.de
Subject: Re: [PATCH v7 18/22] wifi: nxpwifi: add core driver implementation
Date: Fri, 5 Dec 2025 16:33:13 +0800 [thread overview]
Message-ID: <aTKYySrs9vZP9vmM@nxpwireless-Inspiron-14-Plus-7440> (raw)
In-Reply-To: <f2pjxhk2amhubmu4vvhjqcy74u2ine55oswka2ybykgnuajh4x@eyyegw3wfrsx>
On Thu, Nov 20, 2025 at 09:17:58 PM +0530, Abdun Nihaal wrote:
> On Mon, Nov 17, 2025 at 07:00:42PM +0800, Jeff Chen wrote:
> > diff --git a/drivers/net/wireless/nxp/nxpwifi/main.c b/drivers/net/wireless/nxp/nxpwifi/main.c
> > +
> > + adapter->workqueue =
> > + alloc_workqueue("NXPWIFI_WORK_QUEUE",
> > + WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND, 0);
> > + if (!adapter->workqueue) {
> > + ret = -ENOMEM;
> > + goto err_kmalloc;
> > + }
> > +
> > + INIT_WORK(&adapter->main_work, nxpwifi_main_work);
> > +
> > + if (adapter->rx_work_enabled) {
> > + adapter->rx_workqueue = alloc_workqueue("NXPWIFI_RX_WORK_QUEUE",
> > + WQ_HIGHPRI |
> > + WQ_MEM_RECLAIM |
> > + WQ_UNBOUND, 0);
> > + if (!adapter->rx_workqueue) {
> > + ret = -ENOMEM;
> > + goto err_kmalloc;
> > + }
> > +
> > + INIT_WORK(&adapter->rx_work, nxpwifi_rx_work);
> > + }
>
> In nxpwifi_add_card(), if the allocation of rx_workqueue fails, then the
> adapter->workqueue is not freed in the error path. The function which
> frees the workqueues nxpwifi_terminate_workqueue() is on err_registerdev
>
> Should one or both goto in the workqueue allocations error path jump to
> err_registerdev label instead of err_kmalloc?
>
> > +err_registerdev:
> > + set_bit(NXPWIFI_SURPRISE_REMOVED, &adapter->work_flags);
> > + nxpwifi_terminate_workqueue(adapter);
> > + if (adapter->hw_status == NXPWIFI_HW_STATUS_READY) {
> > + pr_debug("info: %s: shutdown nxpwifi\n", __func__);
> > + nxpwifi_shutdown_drv(adapter);
> > + nxpwifi_free_cmd_buffers(adapter);
> > + }
> > +err_kmalloc:
> > + if (adapter->irq_wakeup >= 0)
> > + device_init_wakeup(adapter->dev, false);
> > + nxpwifi_free_adapter(adapter);
> > +
> > +err_init_sw:
> > +
> > + return ret;
> > +}
>
Hi Abdun,
Yes, good catch. This issue has been addressed in nxpwifi v8.
Thanks for pointing this out.
Jeff
next prev parent reply other threads:[~2025-12-05 8:34 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 11:00 [PATCH v7 00/22] wifi: nxpwifi: create nxpwifi to support iw61x Jeff Chen
2025-11-17 11:00 ` [PATCH v7 01/22] wifi: nxpwifi: Add 802.11n support for client and AP modes Jeff Chen
2025-11-17 11:00 ` [PATCH v7 02/22] wifi: nxpwifi: add initial support for 802.11ac Jeff Chen
2025-11-17 11:00 ` [PATCH v7 03/22] wifi: nxpwifi: add initial support for 802.11ax Jeff Chen
2025-11-17 11:00 ` [PATCH v7 04/22] wifi: nxpwifi: add support for 802.11h (DFS and TPC) Jeff Chen
2025-11-17 11:00 ` [PATCH v7 05/22] wifi: nxpwifi: add support for WMM Jeff Chen
2025-11-17 11:00 ` [PATCH v7 06/22] wifi: nxpwifi: add scan support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 07/22] wifi: nxpwifi: add join and association support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 08/22] wifi: nxpwifi: add channel/frequency/power (cfp) support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 09/22] wifi: nxpwifi: add configuration support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 10/22] wifi: nxpwifi: implement cfg80211 ops for STA and AP modes Jeff Chen
2025-11-17 11:00 ` [PATCH v7 11/22] wifi: nxpwifi: add firmware command and TLV definitions Jeff Chen
2025-11-17 11:00 ` [PATCH v7 12/22] wifi: nxpwifi: introduce command and event handling infrastructure Jeff Chen
2025-11-25 15:04 ` [PATCH v7 12/22] wifi: nxpwifi: introduce command and event handling infrastructure# Sascha Hauer
2025-11-17 11:00 ` [PATCH v7 13/22] wifi: nxpwifi: add data path support for STA and AP modes Jeff Chen
2025-11-17 11:00 ` [PATCH v7 14/22] wifi: nxpwifi: add debugfs support for diagnostics and testing Jeff Chen
2025-11-17 11:00 ` [PATCH v7 15/22] wifi: nxpwifi: add ethtool support for Wake-on-LAN Jeff Chen
2025-11-17 11:00 ` [PATCH v7 16/22] wifi: nxpwifi: add utility and IE handling support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 17/22] wifi: nxpwifi: add driver initialization and shutdown support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 18/22] wifi: nxpwifi: add core driver implementation Jeff Chen
2025-11-20 15:47 ` Abdun Nihaal
2025-12-05 8:33 ` jeff.chen_1 [this message]
2025-11-17 11:00 ` [PATCH v7 19/22] wifi: nxpwifi: add initial SDIO bus driver support Jeff Chen
2025-11-17 11:00 ` [PATCH v7 20/22] wifi: nxpwifi: add NXP vendor and IW61x device IDs to sdio_ids.h Jeff Chen
2025-11-17 11:00 ` [PATCH v7 21/22] wifi: nxpwifi: add Kconfig and Makefile for kernel integration Jeff Chen
2025-11-17 11:00 ` [PATCH v7 22/22] wifi: nxpwifi: add MAINTAINERS entry for nxpwifi driver Jeff Chen
2025-11-17 19:10 ` [PATCH v7 00/22] wifi: nxpwifi: create nxpwifi to support iw61x Jeff Johnson
2025-11-20 9:01 ` Johannes Berg
2025-12-05 8:23 ` Jeff Chen
2025-12-05 8:12 ` Jeff Chen
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=aTKYySrs9vZP9vmM@nxpwireless-Inspiron-14-Plus-7440 \
--to=jeff.chen_1@nxp.com \
--cc=abdun.nihaal@gmail.com \
--cc=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tsung-hsien.hsieh@nxp.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox