diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2019-07-16 23:39:30 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2020-03-16 14:25:13 +0000 |
commit | 2c0c154a838060eb683599faf9cbfa3e66dd42c8 (patch) | |
tree | e9381cbfb6c4c647d364ac128e7ac4d9b051649b /src | |
parent | 16ae0d06c6711a36c814618e06bf2be53079af81 (diff) |
Remove NULL check after a "cannot fail" function
XNFasprintf cannot fail - aka busid cannot be NULL.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/amdgpu_probe.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c index 229202b..8250156 100644 --- a/src/amdgpu_probe.c +++ b/src/amdgpu_probe.c @@ -84,10 +84,6 @@ static char *amdgpu_bus_id(ScrnInfoPtr pScrn, struct pci_device *dev) XNFasprintf(&busid, "pci:%04x:%02x:%02x.%u", dev->domain, dev->bus, dev->dev, dev->func); - if (!busid) - xf86DrvMsgVerb(pScrn->scrnIndex, X_ERROR, 0, - "AMDGPU: Failed to generate bus ID string\n"); - return busid; } @@ -145,8 +141,6 @@ static int amdgpu_kernel_open_fd(ScrnInfoPtr pScrn, dev = pci_dev; busid = amdgpu_bus_id(pScrn, dev); - if (!busid) - return -1; if (!amdgpu_kernel_mode_enabled(pScrn, busid)) { free(busid); |