diff options
author | Dan Carpenter <error27@gmail.com> | 2010-04-22 01:55:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-23 00:57:26 +0200 |
commit | 24acc6895616b373475e92e49925efc3ef591563 (patch) | |
tree | 69cbd3f262881d42602e99377faac584c3b2d8d0 | |
parent | rtnetlink: potential ERR_PTR dereference (diff) | |
download | linux-24acc6895616b373475e92e49925efc3ef591563.tar.xz linux-24acc6895616b373475e92e49925efc3ef591563.zip |
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>
-rw-r--r-- | net/rds/rdma_transport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c index 9ece910ea394..7b155081b4dc 100644 --- a/net/rds/rdma_transport.c +++ b/net/rds/rdma_transport.c @@ -134,7 +134,7 @@ static int __init rds_rdma_listen_init(void) ret = PTR_ERR(cm_id); printk(KERN_ERR "RDS/RDMA: failed to setup listener, " "rdma_create_id() returned %d\n", ret); - goto out; + return ret; } sin.sin_family = AF_INET, |