diff options
-rw-r--r-- | drivers/pci/search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 9f7090fa8771..c6e79d01ce3d 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -202,7 +202,7 @@ static struct pci_dev * pci_find_subsys(unsigned int vendor, | |||
202 | * can cause some machines to crash. So here we detect and flag that | 202 | * can cause some machines to crash. So here we detect and flag that |
203 | * situation and bail out early. | 203 | * situation and bail out early. |
204 | */ | 204 | */ |
205 | if (unlikely(list_empty(&pci_devices))) | 205 | if (unlikely(no_pci_devices())) |
206 | return NULL; | 206 | return NULL; |
207 | down_read(&pci_bus_sem); | 207 | down_read(&pci_bus_sem); |
208 | n = from ? from->global_list.next : pci_devices.next; | 208 | n = from ? from->global_list.next : pci_devices.next; |
@@ -277,7 +277,7 @@ pci_get_subsys(unsigned int vendor, unsigned int device, | |||
277 | * can cause some machines to crash. So here we detect and flag that | 277 | * can cause some machines to crash. So here we detect and flag that |
278 | * situation and bail out early. | 278 | * situation and bail out early. |
279 | */ | 279 | */ |
280 | if (unlikely(list_empty(&pci_devices))) | 280 | if (unlikely(no_pci_devices())) |
281 | return NULL; | 281 | return NULL; |
282 | down_read(&pci_bus_sem); | 282 | down_read(&pci_bus_sem); |
283 | n = from ? from->global_list.next : pci_devices.next; | 283 | n = from ? from->global_list.next : pci_devices.next; |