mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 21:40:54 +07:00
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>
This commit is contained in:
parent
80032cffb9
commit
24acc68956
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user