diff options
author | Dan Carpenter <error27@gmail.com> | 2009-04-09 14:09:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-09 17:21:22 -0700 |
commit | 94713bab649736177a1c33a39b7bb33cbd5af3a5 (patch) | |
tree | ce5bb57051bd5d798308120b540985188c5e5498 /net/rds/ib.c | |
parent | 5d57eeb52ae71a03c8e083a9b0a818a9b63ca440 (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/ib.c')
-rw-r--r-- | net/rds/ib.c | 4 |
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; |