]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/cma: Simplify rdma_resolve_addr() error flow
authorParav Pandit <parav@mellanox.com>
Sun, 29 Jul 2018 08:53:09 +0000 (11:53 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 31 Jul 2018 02:49:04 +0000 (20:49 -0600)
commit6e9faa05f7a8b048694d81276a4d22813e007392
tree140ac9d8d58b1f0f739b8e6ad2c763b01906c3e1
parent829be32dd84dee2aa4e7eea8a4d54296925efc18
RDMA/cma: Simplify rdma_resolve_addr() error flow

Currently dst address is first set and later on cleared on either of the
3 error conditions are met.
However none of the APIs or checks are supposed to refer to the
destination address of the cm_id.
Therefore, set the destination address after necessary checks pass which
simplifies the error flow.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/cma.c