[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <db778d8c-0a56-4b01-b5b5-5610a68a4875@web.de>
Date: Thu, 3 Apr 2025 12:13:30 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Henry Martin <bsdhenrymartin@...il.com>, linux-wireless@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Angelo Gioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Peter Chiu <chui-hao.chiu@...iatek.com>, Felix Fietkau <nbd@....name>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>, Rex Lu <rex.lu@...iatek.com>,
Ryder Lee <ryder.lee@...iatek.com>, Sean Wang <sean.wang@...iatek.com>,
Shayne Chen <shayne.chen@...iatek.com>, Shengyu Qu <wiagn233@...look.com>
Subject: Re: [PATCH] wifi: mt76: mt7996: Fix null-ptr-deref in
mt7996_mmio_wed_init()
…
> 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
Powered by blists - more mailing lists