Skip to content

Commit

Permalink
PCI: mt7621: Add sentinel to quirks table
Browse files Browse the repository at this point in the history
[ Upstream commit 1909893 ]

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 7c18b64 ("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: b483b4e ("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>
  • Loading branch information
john-tho authored and gregkh committed Dec 31, 2022
1 parent bcc65c2 commit 3e9c395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/staging/mt7621-pci/pci-mt7621.c
Expand Up @@ -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)
Expand Down

0 comments on commit 3e9c395

Please sign in to comment.