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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>

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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux