Re: [PATCH v1] wifi: brcmfmac: skip bus_reset cancel when the work was never initialized

From: Arend van Spriel

Date: Sun Nov 15 2026 - 16:03:14 EST


On Tue, 20 Oct 2026 21:39:13 +0100, Vitor Soares <ivitro@xxxxxxxxx> wrote:
> From: Vitor Soares <vitor.soares@xxxxxxxxxxx>
>
> When the firmware request fails, brcmf_pcie_setup() releases its own
> driver, which runs brcmf_pcie_remove() -> brcmf_bus_cancel_reset_work().
> At that point brcmf_alloc() has set bus_if->drvr, but brcmf_attach() has
> not run, so drvr->bus_reset was never INIT_WORK()ed. cancel_work_sync()
> on the zeroed work then trips WARN_ON(!work->func) in __flush_work():

[...]

> brcmf_bus_schedule_reset() already gates on bus_reset.func for this
> reason. Apply the same check on the cancel side.
>
> Reproduced on a BCM43752 PCIe module with the firmware file absent.
> With this change the same failure path completes without the warning.
>
> Fixes: 43b25879f004 ("wifi: brcmfmac: drain bus_reset work on device removal")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Vitor Soares <vitor.soares@xxxxxxxxxxx>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>

Regards,
Arend