Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24acc689 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarAndy Grover <andy.grover@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80032cff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,