summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2009-04-09 14:09:46 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-09 17:21:22 -0700
commit94713bab649736177a1c33a39b7bb33cbd5af3a5 (patch)
treece5bb57051bd5d798308120b540985188c5e5498 /net/rds
parent5d57eeb52ae71a03c8e083a9b0a818a9b63ca440 (diff)
ERR_PTR() dereference in net/rds/ib.c
rdma_create_id() doesn't return NULL, only ERR_PTR(). Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested. regards, dan carpenter Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/ib.c b/net/rds/ib.c
index 4933b380985..b9bcd32431e 100644
--- a/net/rds/ib.c
+++ b/net/rds/ib.c
@@ -224,8 +224,8 @@ static int rds_ib_laddr_check(__be32 addr)
* IB and iWARP capable NICs.
*/
cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP);
- if (!cm_id)
- return -EADDRNOTAVAIL;
+ if (IS_ERR(cm_id))
+ return PTR_ERR(cm_id);
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;