projects
/
openwrt
/
staging
/
dedeckeh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel: ssb: fallback-sprom: check bustype
[openwrt/staging/dedeckeh.git]
/
target
/
linux
/
generic
/
files
/
drivers
/
ssb
/
fallback-sprom.c
diff --git
a/target/linux/generic/files/drivers/ssb/fallback-sprom.c
b/target/linux/generic/files/drivers/ssb/fallback-sprom.c
index 65436a42ec51e9ac03bb8de067a62a4ce9bac5b7..26f0fd2f0366385818a9e27a8a3d02922b53004c 100644
(file)
--- a/
target/linux/generic/files/drivers/ssb/fallback-sprom.c
+++ b/
target/linux/generic/files/drivers/ssb/fallback-sprom.c
@@
-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)
{
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;
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 ||
list_for_each_entry(pos, &ssb_fbs_list, list) {
if (pos->pci_bus != pci_bus ||