]> 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)
commita7d4770717b05afdda7419ccbe0a702e0e303423
tree1441e6ccfd65cb68053401e1e5090e108e818b5c
parentac11c19505e180d26e11c114b21abc6dc2cca2e9
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: b4732f598443 ("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