diff options
-rw-r--r-- | src/intel_device.c | 3 | ||||
-rw-r--r-- | src/intel_module.c | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index af1221bf..91405fa2 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -183,6 +183,9 @@ static int __intel_open_device(const struct pci_device *pci, char **path) char id[20]; int ret; + if (pci == NULL) + return -1; + snprintf(id, sizeof(id), "pci:%04x:%02x:%02x.%d", pci->domain, pci->bus, pci->dev, pci->func); diff --git a/src/intel_module.c b/src/intel_module.c index d8cf9de6..72c028e3 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -546,9 +546,6 @@ intel_platform_probe(DriverPtr driver, { unsigned scrn_flags = 0; - if (!dev->pdev) - return FALSE; - if (intel_open_device(entity_num, dev->pdev, dev) == -1) return FALSE; |