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)
commitdc892e17bbae670a3d7aa6ab8bd1033b15b24645
tree1441e6ccfd65cb68053401e1e5090e108e818b5c
parenteb54714ddcb2462d4d4b8aa78d028b61e217a835
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: 58e9cc90cda7 ("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