[PATCH xf86-video-amdgpu 09/19] Remove error handling on xnfcalloc()

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 4 14:29:44 UTC 2018


From: Emil Velikov <emil.velikov at collabora.com>

The function "cannot fail", thus we'll never hit the error path.

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 src/amdgpu_probe.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/amdgpu_probe.c b/src/amdgpu_probe.c
index 8a16060..8842868 100644
--- a/src/amdgpu_probe.c
+++ b/src/amdgpu_probe.c
@@ -232,8 +232,6 @@ amdgpu_probe(ScrnInfoPtr pScrn, int entity_num,
 
 	if (!pPriv->ptr) {
 		pPriv->ptr = xnfcalloc(sizeof(AMDGPUEntRec), 1);
-		if (!pPriv->ptr)
-			goto error;
 
 		if (!amdgpu_device_setup(pScrn, pci_dev, dev, pPriv->ptr))
 			goto error;
-- 
2.16.0



More information about the amd-gfx mailing list