IB/ipoib: Add child to parent list only if device initialized
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jason Gunthorpe
AppliedQuoted 9 lines · Leon Romanovsky
From: Valentine Fatiev <[email protected]>
Despite failure in
ipoib_dev_init()we continue with initialization flow and creation of child device. It causes to the situation where this child device is added too early to parent device list.change the logic, so in case of failure we properly return error from
ipoib_dev_init()and add child only in success path.
Quoted 7 lines
Fixes eaeb39842508 ("IB/ipoib: Move init code to ndo_init")Signed-off-by Valentine Fatiev <[email protected]>Reviewed-by Feras Daoud <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 34 +++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-)
Applied to for-next, thanks
Jason