RDMA/bnxt_re: Fix an error path in bnxt_re_add_device
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Tue, 8 Oct 2024 07:41:39 +0000 (00:41 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 11 Oct 2024 23:49:01 +0000 (20:49 -0300)
commita5e099e0c464ac3d077339f481981e0d859b8545
tree361cde5acd1e3bd16fec5934ad7a0b73b4a677fd
parent8be3e5b0c96beeefe9d5486b96575d104d3e7d17
RDMA/bnxt_re: Fix an error path in bnxt_re_add_device

In bnxt_re_add_device(), when register netdev notifier fails, driver is
not unregistering the IB device in the error cleanup path.  Also, removed
the duplicate cleanup in error path of bnxt_re_probe.

Fixes: 94a9dc6ac8f7 ("RDMA/bnxt_re: Group all operations under add_device and remove_device")
Link: https://patch.msgid.link/r/1728373302-19530-8-git-send-email-selvin.xavier@broadcom.com
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/bnxt_re/main.c