Skip to content
Commit 91b01061 authored by Valentine Fatiev's avatar Valentine Fatiev Committed by Jason Gunthorpe
Browse files

IB/ipoib: Add child to parent list only if device initialized



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.

Fixes: eaeb3984 ("IB/ipoib: Move init code to ndo_init")
Signed-off-by: default avatarValentine Fatiev <valentinef@mellanox.com>
Reviewed-by: default avatarFeras Daoud <ferasda@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 50ba3c18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment