summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJohn Thomson <git@johnthomson.fastmail.com.au>2022-12-06 06:46:45 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-12-31 13:14:26 +0100
commit3e9c395ef2d52975b2c2894d2da09d6db2958bc6 (patch)
tree8beeb7421cc6c55ee2b211d85954f7a32736f38d /drivers/staging
parentbcc65c2e2a06a793d162719f1e22c573e63ef7a8 (diff)
downloadlinux-stable-3e9c395ef2d52975b2c2894d2da09d6db2958bc6.tar.gz
linux-stable-3e9c395ef2d52975b2c2894d2da09d6db2958bc6.tar.bz2
linux-stable-3e9c395ef2d52975b2c2894d2da09d6db2958bc6.zip
PCI: mt7621: Add sentinel to quirks table
[ Upstream commit 19098934f910b4d47cb30251dd39ffa57bef9523 ] Current driver is missing a sentinel in the struct soc_device_attribute array, which causes an oops when assessed by the soc_device_match(mt7621_pcie_quirks_match) call. This was only exposed once the CONFIG_SOC_MT7621 mt7621 soc_dev_attr was fixed to register the SOC as a device, in: commit 7c18b64bba3b ("mips: ralink: mt7621: do not use kzalloc too early") Fix it by adding the required sentinel. Link: https://lore.kernel.org/lkml/26ebbed1-0fe9-4af9-8466-65f841d0b382@app.fastmail.com Link: https://lore.kernel.org/r/20221205204645.301301-1-git@johnthomson.fastmail.com.au Fixes: b483b4e4d3f6 ("staging: mt7621-pci: add quirks for 'E2' revision using 'soc_device_attribute'") Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/mt7621-pci/pci-mt7621.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index c4f57bb63482..b520d1e0edd1 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -511,7 +511,8 @@ static int mt7621_pcie_register_host(struct pci_host_bridge *host)
}
static const struct soc_device_attribute mt7621_pcie_quirks_match[] = {
- { .soc_id = "mt7621", .revision = "E2" }
+ { .soc_id = "mt7621", .revision = "E2" },
+ { /* sentinel */ }
};
static int mt7621_pcie_probe(struct platform_device *pdev)