Commit 5d57eeb5 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

ERR_PTR() dereference in net/rds/iw.c

rdma_create_id() returns ERR_PTR() not null.

Found by smatch (

).  Compile tested.

dan carpenter

Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: default avatarAndy Grover <>
Signed-off-by: default avatarDavid S. Miller <>
parent 05a178ec
......@@ -233,8 +233,8 @@ static int rds_iw_laddr_check(__be32 addr)
* IB and iWARP capable NICs.
cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
if (!cm_id)
if (IS_ERR(cm_id))
return PTR_ERR(cm_id);
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment