[ipoib] Fix releasing a lock too early.
authortzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 5 Nov 2008 17:08:18 +0000 (17:08 +0000)
committertzachid <tzachid@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 5 Nov 2008 17:08:18 +0000 (17:08 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1732 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_port.c

index cd6b7ec..2eedec4 100644 (file)
@@ -5731,12 +5731,12 @@ __bcast_cb(
                cl_memclr(&port_info, sizeof(port_info));\r
                port_info.base_lid = p_port->base_lid;\r
                status = __endpt_mgr_add_local( p_port, &port_info );\r
-               cl_obj_unlock( &p_port->obj );\r
                if( status != IB_SUCCESS )\r
                {\r
                        IPOIB_PRINT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,\r
                                ("__endpt_mgr_add_local returned %s\n",\r
                                p_port->p_adapter->p_ifc->get_err_str( status )) );\r
+                               cl_obj_unlock( &p_port->obj );\r
                        goto err;\r
                }\r
        }\r