提交 497158aa 编写于 作者: S Selvin Xavier 提交者: Jason Gunthorpe

RDMA/bnxt_re: Fix the ib_reg failure cleanup

Release the netdev references in the cleanup path.  Invokes the cleanup
routines if bnxt_re_ib_reg fails.
Signed-off-by: NSelvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
上级 c354dff0
......@@ -1416,9 +1416,12 @@ static void bnxt_re_task(struct work_struct *work)
switch (re_work->event) {
case NETDEV_REGISTER:
rc = bnxt_re_ib_reg(rdev);
if (rc)
if (rc) {
dev_err(rdev_to_dev(rdev),
"Failed to register with IB: %#x", rc);
bnxt_re_remove_one(rdev);
bnxt_re_dev_unreg(rdev);
}
break;
case NETDEV_UP:
bnxt_re_dispatch_event(&rdev->ibdev, NULL, 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册