From 2c0c154a838060eb683599faf9cbfa3e66dd42c8 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 16 Jul 2019 23:39:30 +0100 Subject: Remove NULL check after a "cannot fail" function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit XNFasprintf cannot fail - aka busid cannot be NULL. Signed-off-by: Emil Velikov Reviewed-by: Michel Dänzer Acked-by: Alex Deucher --- src/amdgpu_probe.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') 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); -- cgit v1.2.3