mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 05:38:00 +00:00
kernel: ssb: fallback-sprom: check bustype
host_pci is only defined when bustype is SSB_BUSTYPE_PCI. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
60acbbb1af
commit
1129b226f7
@ -56,9 +56,14 @@ static struct list_head ssb_fbs_list = LIST_HEAD_INIT(ssb_fbs_list);
|
||||
|
||||
int ssb_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out)
|
||||
{
|
||||
const u32 pci_bus = bus->host_pci->bus->number;
|
||||
const u32 pci_dev = PCI_SLOT(bus->host_pci->devfn);
|
||||
struct ssb_fbs *pos;
|
||||
u32 pci_bus, pci_dev;
|
||||
|
||||
if (bus->bustype != SSB_BUSTYPE_PCI)
|
||||
return -ENOENT;
|
||||
|
||||
pci_bus = bus->host_pci->bus->number;
|
||||
pci_dev = PCI_SLOT(bus->host_pci->devfn);
|
||||
|
||||
list_for_each_entry(pos, &ssb_fbs_list, list) {
|
||||
if (pos->pci_bus != pci_bus ||
|
||||
|
Loading…
Reference in New Issue
Block a user