pci: Fix a vendor/device id bug where only one might be wrong
Only one wrong is sufficient to fail the test: the found device is not the one we are looking up to. Change-Id: I2a54b5683fedf7d54de1e1553aecba40b6b6b2e1 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
945ed24597
commit
1e006d8146
|
@ -336,8 +336,8 @@ static inline int pci_dev_scan(union pci_addr_reg pci_ctrl_addr,
|
|||
}
|
||||
|
||||
if (lookup.info.vendor_id && lookup.info.device_id &&
|
||||
lookup.info.vendor_id != pci_dev_header.field.vendor_id &&
|
||||
lookup.info.device_id != pci_dev_header.field.device_id) {
|
||||
(lookup.info.vendor_id != pci_dev_header.field.vendor_id ||
|
||||
lookup.info.device_id != pci_dev_header.field.device_id)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue