Fix segfault on probing a non-PCI platform device on a system with PCI.
Some Broadcom set-top-box boards have PCI busses, but the GPU is still probed through DT. We would dereference a null busid here in that case. Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
3297a1c871
commit
e50c85f4eb
|
@ -289,7 +289,7 @@ xf86platformProbe(void)
|
|||
for (i = 0; i < xf86_num_platform_devices; i++) {
|
||||
char *busid = xf86_platform_odev_attributes(i)->busid;
|
||||
|
||||
if (pci && (strncmp(busid, "pci:", 4) == 0)) {
|
||||
if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) {
|
||||
platform_find_pci_info(&xf86_platform_devices[i], busid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue