mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 16:07:39 +00:00
RDMA/bnxt_re: Fix the ib_reg failure cleanup
[ Upstream commit 497158aa5f
]
Release the netdev references in the cleanup path. Invokes the cleanup
routines if bnxt_re_ib_reg fails.
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2bce0d98b9
commit
62ee80d3b4
1 changed files with 4 additions and 1 deletions
|
@ -1240,9 +1240,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,
|
||||
|
|
Loading…
Reference in a new issue