diff mbox series

[opensm,4/6] opensm/osm_mlnx_ext_port_info_rcv.c: Check the pointer of osm_sm_t before access it

Message ID 20181121065811.21806-4-honli@redhat.com (mailing list archive)
State Not Applicable
Headers show
Series [opensm,1/6] opensm/osm_ucast_cache.h: Improve coding style and comments | expand

Commit Message

Honggang LI Nov. 21, 2018, 6:58 a.m. UTC
From: Honggang Li <honli@redhat.com>

Signed-off-by: Honggang Li <honli@redhat.com>
---
 opensm/osm_mlnx_ext_port_info_rcv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Hal Rosenstock Nov. 21, 2018, 1:47 p.m. UTC | #1
On 11/21/2018 1:58 AM, Honggang LI wrote:
> From: Honggang Li <honli@redhat.com>
> 
> Signed-off-by: Honggang Li <honli@redhat.com>

Thanks. Applied (1-4).

-- Hal
diff mbox series

Patch

diff --git a/opensm/osm_mlnx_ext_port_info_rcv.c b/opensm/osm_mlnx_ext_port_info_rcv.c
index 8151bbce..e4f8521e 100644
--- a/opensm/osm_mlnx_ext_port_info_rcv.c
+++ b/opensm/osm_mlnx_ext_port_info_rcv.c
@@ -73,9 +73,10 @@  void osm_mlnx_epi_rcv_process(IN void *context, IN void *data)
 	ib_net64_t port_guid, node_guid;
 	uint8_t port_num, portnum, start_port = 1;
 
+	CL_ASSERT(sm);
+
 	OSM_LOG_ENTER(sm->p_log);
 
-	CL_ASSERT(sm);
 	CL_ASSERT(p_madw);
 
 	p_smp = osm_madw_get_smp_ptr(p_madw);