From: Markus Elfring <Markus.Elfring@web.de>
To: Henry Martin <bsdhenrymartin@gmail.com>,
linux-wireless@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Angelo Gioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Chad Monroe <chad@monroe.io>, Felix Fietkau <nbd@nbd.name>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Peter Chiu <chui-hao.chiu@mediatek.com>,
Ryder Lee <ryder.lee@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Shayne Chen <shayne.chen@mediatek.com>,
Shengyu Qu <wiagn233@outlook.com>
Subject: Re: [PATCH v2] wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init()
Date: Mon, 7 Apr 2025 10:00:23 +0200 [thread overview]
Message-ID: <946ab07c-47d0-443a-9ece-2ce65d586bef@web.de> (raw)
In-Reply-To: <20250407061900.85317-1-bsdhenrymartin@gmail.com>
…
> Prevent null pointer dereference in mt7915_mmio_wed_init().
Can any other summary phrase variant become more desirable accordingly?
…
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
…
> @@ -678,6 +681,9 @@ int mt7915_mmio_wed_init(struct mt7915_dev *dev, void *pdev_ptr,
> wed->wlan.bus_type = MTK_WED_BUS_AXI;
> wed->wlan.base = devm_ioremap(dev->mt76.dev, res->start,
> resource_size(res));
> + if (!wed->wlan.base)
> + return -ENOMEM;
> +
…
Would the function “devm_platform_get_and_ioremap_resource” be applicable
in this else branch?
https://elixir.bootlin.com/linux/v6.14-rc6/source/drivers/base/platform.c#L87
Regards,
Markus
prev parent reply other threads:[~2025-04-07 8:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 6:19 [PATCH v2] wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init() Henry Martin
2025-04-07 8:00 ` Markus Elfring [this message]
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=946ab07c-47d0-443a-9ece-2ce65d586bef@web.de \
--to=markus.elfring@web.de \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bsdhenrymartin@gmail.com \
--cc=chad@monroe.io \
--cc=chui-hao.chiu@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
--cc=wiagn233@outlook.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