diff options
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r-- | src/loader/loader.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c index a45328e2464..6e3e59d1687 100644 --- a/src/loader/loader.c +++ b/src/loader/loader.c @@ -459,15 +459,6 @@ loader_get_driver_for_fd(int fd) return driver; #endif - driver = loader_get_kernel_driver_name(fd); - bool is_amdgpu = driver && strcmp(driver, "amdgpu") == 0; - free(driver); - - if (is_amdgpu) { - driver = strdup("radeonsi"); - goto out; - } - if (!loader_get_pci_id_for_fd(fd, &vendor_id, &chip_id)) { driver = loader_get_kernel_driver_name(fd); if (driver) @@ -494,6 +485,15 @@ loader_get_driver_for_fd(int fd) } } + driver = loader_get_kernel_driver_name(fd); + bool is_amdgpu = driver && strcmp(driver, "amdgpu") == 0; + free(driver); + + if (is_amdgpu) + driver = strdup("radeonsi"); + else + driver = NULL; + out: log_(driver ? _LOADER_DEBUG : _LOADER_WARNING, "pci id for fd %d: %04x:%04x, driver %s\n", |