rdma: potential ERR_PTR dereference
authorDan Carpenter <error27@gmail.com>
Wed, 21 Apr 2010 23:55:27 +0000 (23:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Apr 2010 22:57:26 +0000 (15:57 -0700)
commit24acc6895616b373475e92e49925efc3ef591563
tree69cbd3f262881d42602e99377faac584c3b2d8d0
parent80032cffb95edff4fc216b1cb21682257be326b7
rdma: potential ERR_PTR dereference

In the original code, the "goto out" calls "rdma_destroy_id(cm_id);"
That isn't needed here and would cause problems because "cm_id" is an
ERR_PTR.  The new code just returns directly.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/rdma_transport.c