* Re: [PATCH rdma-next] IB/ipoib: Add child to parent list only if device initialized
[not found] <20190630134841.19413-1-leon@kernel.org>
@ 2019-07-04 17:30 ` Jason Gunthorpe
0 siblings, 0 replies; only message in thread
From: Jason Gunthorpe @ 2019-07-04 17:30 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Doug Ledford, Valentine Fatiev, RDMA mailing list, Feras Daoud,
Leon Romanovsky
On Sun, Jun 30, 2019 at 04:48:41PM +0300, Leon Romanovsky wrote:
> From: Valentine Fatiev <valentinef@mellanox.com>
>
> 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: eaeb39842508 ("IB/ipoib: Move init code to ndo_init")
> Signed-off-by: Valentine Fatiev <valentinef@mellanox.com>
> Reviewed-by: Feras Daoud <ferasda@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> drivers/infiniband/ulp/ipoib/ipoib_main.c | 34 +++++++++++++----------
> 1 file changed, 20 insertions(+), 14 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] only message in thread