aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2009-04-09 14:09:45 +0000
committerDavid S. Miller <davem@davemloft.net>2009-04-09 17:21:22 -0700
commit5d57eeb52ae71a03c8e083a9b0a818a9b63ca440 (patch)
tree7f8eed714ccff8f7fab0f192bbbb65f3e76301b5 /net/rds
parent05a178ecdc7396b78dfbb5d8bda65108b37b8672 (diff)
downloadkernel_samsung_tuna-5d57eeb52ae71a03c8e083a9b0a818a9b63ca440.zip
kernel_samsung_tuna-5d57eeb52ae71a03c8e083a9b0a818a9b63ca440.tar.gz
kernel_samsung_tuna-5d57eeb52ae71a03c8e083a9b0a818a9b63ca440.tar.bz2
ERR_PTR() dereference in net/rds/iw.c
rdma_create_id() returns ERR_PTR() not null. 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/iw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/iw.c b/net/rds/iw.c
index b732efb..d16e1cb 100644
--- a/net/rds/iw.c
+++ b/net/rds/iw.c
@@ -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)
- return -EADDRNOTAVAIL;
+ if (IS_ERR(cm_id))
+ return PTR_ERR(cm_id);
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;