OSDN Git Service

RDMA/core: Cosmetic change - move member initialization to correct block
authorYuval Shaia <yuval.shaia@oracle.com>
Mon, 18 Feb 2019 14:23:22 +0000 (16:23 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 20 Feb 2019 03:52:19 +0000 (20:52 -0700)
commite278173fd19eb537e73190c50c162950f192e047
treef3000742a69742cfc663656a3e8ccc6b57c76750
parent3b8f8b95d9d3c73637bd33a644952a7cfa8e2c2a
RDMA/core: Cosmetic change - move member initialization to correct block

old_pd is used only if IB_MR_REREG_PD flags is set.
For readability move it's initialization to where it is used.

While there rewrite the whole 'if-else' block so on error jump directly
to label and no need for 'else'

Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_cmd.c