diff --git a/src/common/pci.cpp b/src/common/pci.cpp index 3cc4d8b..101cf25 100644 --- a/src/common/pci.cpp +++ b/src/common/pci.cpp @@ -26,7 +26,7 @@ bool pciutils_is_vendor_id_present(struct pci_dev *devices, int id) { } } - printWarn("Unable to find a valid device for vendor id 0x%.4X using pciutils", id); + printErr("Unable to find a valid device for vendor id 0x%.4X using pciutils", id); return false; } diff --git a/src/cuda/cuda.cpp b/src/cuda/cuda.cpp index c8dcf3b..5a9782d 100644 --- a/src/cuda/cuda.cpp +++ b/src/cuda/cuda.cpp @@ -151,7 +151,9 @@ struct gpu_info* get_gpu_info_cuda(struct pci_dev *devices, int gpu_idx) { gpu->name = (char *) emalloc(sizeof(char) * (strlen(deviceProp.name) + 1)); strcpy(gpu->name, deviceProp.name); - gpu->pci = get_pci_from_pciutils(devices, PCI_VENDOR_ID_NVIDIA, gpu_idx); + if((gpu->pci = get_pci_from_pciutils(devices, PCI_VENDOR_ID_NVIDIA, gpu_idx)) == NULL) { + return NULL; + } gpu->arch = get_uarch_from_cuda(gpu); gpu->cach = get_cache_info(deviceProp); gpu->mem = get_memory_info(gpu, deviceProp);