]> git.baikalelectronics.ru Git - kernel.git/commit
IB/ipoib: Clean error paths in add port
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 13 Jul 2017 10:34:19 +0000 (13:34 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 23 Jul 2017 06:45:11 +0000 (09:45 +0300)
commit02d4eccf6217ecf53c4a26513aebb789e118ed41
tree1441e6ccfd65cb68053401e1e5090e108e818b5c
parentcb0979c471051124fc94331ed975f5874315a6ba
IB/ipoib: Clean error paths in add port

Refactor error paths in ipoib_add_port() function. The code flow
ensures that the function terminates on every error flow and it makes
redundant all "else" cases.

The functions are called during the flow are returning "result < 0", in
case of error, so there is no need to check it explicitly.

Fixes: a329fddc8e25 ("IB/IPoIB: Fix bad error flow in ipoib_add_port()")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c