[core] Release the RDMA interface if ib_register_ca fails. (mlnx 5510)
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 26 Jan 2010 10:01:33 +0000 (10:01 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 26 Jan 2010 10:01:33 +0000 (10:01 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2682 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/bus_pnp.c

index e549a85..5b283fc 100644 (file)
@@ -428,6 +428,10 @@ __register_ca(
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, ("ib_register_ca returned %s.\n",\r
                        ib_get_err_str(ib_status)) );\r
+               p_ext->hca_ifc.InterfaceHeader.InterfaceDereference(\r
+                       p_ext->hca_ifc.InterfaceHeader.Context);\r
+               p_ext->hca_ifc_taken = FALSE;\r
+               \r
                return STATUS_UNSUCCESSFUL;\r
        }\r
        BUS_TRACE_EXIT(BUS_DBG_PNP, ("%s bound to CA guid %I64x\n",\r