diff mbox

[2/11] opensm/osm_pkey_mgr.c: Move clearing of empty_block after any "early" returns

Message ID 4D961B68.80509@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Alex Netes
Headers show

Commit Message

Hal Rosenstock April 1, 2011, 6:37 p.m. UTC
None
diff mbox

Patch

diff --git a/opensm/osm_pkey_mgr.c b/opensm/osm_pkey_mgr.c
index 612130c..ce50f27 100644
--- a/opensm/osm_pkey_mgr.c
+++ b/opensm/osm_pkey_mgr.c
@@ -263,12 +263,12 @@  static int pkey_mgr_update_port(osm_log_t * p_log,
osm_sm_t * sm,
 	ib_pkey_table_t empty_block;
 	int ret = 0;

-	memset(&empty_block, 0, sizeof(ib_pkey_table_t));
-
 	p_physp = p_port->p_physp;
 	if (!p_physp)
 		return FALSE;

+	memset(&empty_block, 0, sizeof(ib_pkey_table_t));
+
 	p_node = osm_physp_get_node_ptr(p_physp);
 	p_pkey_tbl = &p_physp->pkeys;