]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/core: Check for error instead of success in alloc MR function
authorGal Pressman <galpress@amazon.com>
Mon, 6 Jul 2020 12:03:41 +0000 (15:03 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 6 Jul 2020 22:24:20 +0000 (19:24 -0300)
commite12704c7d789c49981ebc44ce05f6343c375728d
treefb708bc4c187cfb94aae3b685e414b462f5b25d3
parent370d587f815f5dc68306edc5008d1016a5c8c4db
RDMA/core: Check for error instead of success in alloc MR function

The common kernel pattern is to check for error, not success.  Flip the if
statement accordingly and keep the main flow unindented.

Link: https://lore.kernel.org/r/20200706120343.10816-2-galpress@amazon.com
Signed-off-by: Gal Pressman <galpress@amazon.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/verbs.c