]> Git Repo - linux.git/commitdiff
rdma: potential ERR_PTR dereference
authorDan Carpenter <[email protected]>
Wed, 21 Apr 2010 23:55:27 +0000 (23:55 +0000)
committerDavid S. Miller <[email protected]>
Thu, 22 Apr 2010 22:57:26 +0000 (15:57 -0700)
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 <[email protected]>
Acked-by: Andy Grover <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/rds/rdma_transport.c

index 9ece910ea394317a7b8dc9fd80e6a7c540e5f9b3..7b155081b4dc59ba8a8565396ff01e78cb7cde21 100644 (file)
@@ -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,
This page took 0.055873 seconds and 4 git commands to generate.