diff mbox

[1/8] librdmacm: Remove NULL checks after calling alloca

Message ID 1404281479-6755-2-git-send-email-sean.hefty@intel.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Hefty, Sean July 2, 2014, 6:11 a.m. UTC
From: Sean Hefty <sean.hefty@intel.com>

alloca doesn't return a NULL pointer on failure.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
---
 src/cma.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/src/cma.c b/src/cma.c
index 9a49a5b..1a88e5c 100644
--- a/src/cma.c
+++ b/src/cma.c
@@ -720,9 +720,6 @@  static int ucma_query_path(struct rdma_cm_id *id)
 
 	size = sizeof(*resp) + sizeof(struct ibv_path_data) * 6;
 	resp = alloca(size);
-	if (!resp)
-		return ERR(ENOMEM);
-
 	CMA_INIT_CMD_RESP(&cmd, sizeof cmd, QUERY, resp, size);
 	id_priv = container_of(id, struct cma_id_private, id);
 	cmd.id = id_priv->handle;