mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	Peter Chiu <chui-hao.chiu@mediatek.com>,
	Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Rex Lu <rex.lu@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] wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
Date: Thu, 3 Apr 2025 12:13:30 +0200	[thread overview]
Message-ID: <db778d8c-0a56-4b01-b5b5-5610a68a4875@web.de> (raw)
In-Reply-To: <20250403064344.64253-1-bsdhenrymartin@gmail.com>

…
> Add NULL check after devm_ioremap() to prevent this issue.

Can a summary phrase like “Prevent null pointer dereference in mt7996_mmio_wed_init()”
be a bit nicer?


…
> +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
> @@ -323,6 +323,8 @@ int mt7996_mmio_wed_init(struct mt7996_dev *dev, void *pdev_ptr,
>  	wed->wlan.base = devm_ioremap(dev->mt76.dev,
>  				      pci_resource_start(pci_dev, 0),
>  				      pci_resource_len(pci_dev, 0));
> +	if (!wed->wlan.base)
> +		return -ENOMEM;

Can a blank line be desirable after such a statement?

Regards,
Markus

  reply	other threads:[~2025-04-03 10:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03  6:43 [PATCH v1] " Henry Martin
2025-04-03 10:13 ` Markus Elfring [this message]
2025-04-07  3:15   ` [PATCH] " henry martin

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=db778d8c-0a56-4b01-b5b5-5610a68a4875@web.de \
    --to=markus.elfring@web.de \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bsdhenrymartin@gmail.com \
    --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=rex.lu@mediatek.com \
    --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

all inboxes | Powered by JetHome®