Linux wireless drivers development
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev,
	brcm80211-dev-list.pdl@broadcom.com
Subject: Re: [PATCH v2] wifi: brcmfmac: Fix potential kernel oops when probe fails
Date: Tue, 3 Feb 2026 12:45:30 +0100	[thread overview]
Message-ID: <b49e525c-6dfc-4cf4-9aae-b22485341c67@broadcom.com> (raw)
In-Reply-To: <20260203102133.1478331-1-m.szyprowski@samsung.com>

On 03/02/2026 11:21, Marek Szyprowski wrote:
> When probe of the sdio brcmfmac device fails for some reasons (i.e.
> missing firmware), the sdiodev->bus is set to error instead of NULL, thus
> the cleanup later in brcmf_sdio_remove() tries to free resources via
> invalid bus pointer. This happens because sdiodev->bus is set 2 times:
> first in brcmf_sdio_probe() and second time in brcmf_sdiod_probe(). Fix
> this by chaning the brcmf_sdio_probe() function to return the error code
> and set sdio->bus only there.

Looks much better, but wanted to see what was done in the commit 
referenced in the Fixes: tag.

> Fixes: 0ff0843310b7 ("wifi: brcmfmac: Add optional lpo clock enable support")

So that patch wanted to propagate the result of 
devm_clk_get_optional_enabled() call in brcmf_of_probe():of.c to retry 
later. It ends up in brcmf_sdio_probe_attach() which is called in 
brcmf_sdio_probe(). Anyway, it seems okay to me. Will give it a spin in 
my setup just to be sure.

Thanks,
Arend

  reply	other threads:[~2026-02-03 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20260203102148eucas1p10c43be72827d74e5be41fe40a84fbd59@eucas1p1.samsung.com>
2026-02-03 10:21 ` [PATCH v2] wifi: brcmfmac: Fix potential kernel oops when probe fails Marek Szyprowski
2026-02-03 11:45   ` Arend van Spriel [this message]
2026-02-03 14:05     ` Marek Szyprowski
2026-02-12  6:38   ` Arend van Spriel

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=b49e525c-6dfc-4cf4-9aae-b22485341c67@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=linux-wireless@vger.kernel.org \
    --cc=m.szyprowski@samsung.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