[v0.11] Handle the case where the GPU is not found in the pci LUT

This commit is contained in:
Dr-Noob
2021-12-18 20:11:02 +01:00
parent bfb9738132
commit a397eb398e
5 changed files with 11 additions and 7 deletions

View File

@@ -149,9 +149,13 @@ struct uarch* get_uarch_from_pci(struct pci* pci) {
arch->chip_str = NULL;
arch->chip = get_chip_from_pci_intel(pci);
map_chip_to_uarch_intel(arch);
return arch;
if(arch->chip == CHIP_UNKNOWN_INTEL) {
return NULL;
}
else {
map_chip_to_uarch_intel(arch);
return arch;
}
}
char* get_name_from_uarch(struct uarch* arch) {