diff options
author | Dan Carpenter <error27@gmail.com> | 2009-04-09 10:09:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-09 20:21:22 -0400 |
commit | 94713bab649736177a1c33a39b7bb33cbd5af3a5 (patch) | |
tree | ce5bb57051bd5d798308120b540985188c5e5498 | |
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>
-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 4933b380985e..b9bcd32431e1 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c | |||
@@ -224,8 +224,8 @@ static int rds_ib_laddr_check(__be32 addr) | |||
224 | * IB and iWARP capable NICs. | 224 | * IB and iWARP capable NICs. |
225 | */ | 225 | */ |
226 | cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP); | 226 | cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP); |
227 | if (!cm_id) | 227 | if (IS_ERR(cm_id)) |
228 | return -EADDRNOTAVAIL; | 228 | return PTR_ERR(cm_id); |
229 | 229 | ||
230 | memset(&sin, 0, sizeof(sin)); | 230 | memset(&sin, 0, sizeof(sin)); |
231 | sin.sin_family = AF_INET; | 231 | sin.sin_family = AF_INET; |