qcacmn: avoid access sm before NULL check

This change moves accessing sm after NULL check performed

Change-Id: Iad1c0d9ea9c8bb6e79338259ab93f685b78ad26f
CRs-Fixed: 2407091
这个提交包含在:
Srinivas Pitla
2019-02-28 15:51:49 +05:30
提交者 nshrivas
父节点 09444a10ed
当前提交 9527e111d0
修改 2 个文件,包含 3 行新增2 行删除

查看文件

@@ -79,7 +79,7 @@ qdf_export_symbol(wlan_sm_dispatch);
void wlan_sm_transition_to(struct wlan_sm *sm, uint8_t state)
{
const struct wlan_sm_state_info *state_info = sm->state_info;
struct wlan_sm_state_info *state_info;
uint8_t new_state;
uint8_t old_state;
uint8_t new_sub_st;
@@ -91,6 +91,7 @@ void wlan_sm_transition_to(struct wlan_sm *sm, uint8_t state)
return;
}
state_info = sm->state_info;
cur_state = sm->cur_state;
/* cannot change state from state entry/exit routines */

查看文件

@@ -54,7 +54,7 @@ void mlme_vdev_sm_print_state_event(struct vdev_mlme_obj *vdev_mlme,
enum wlan_vdev_sm_evt event);
/**
* mlme_vdev_sm_print_state_event() - Prints the state/substate
* mlme_vdev_sm_print_state() - Prints the state/substate
* @vdev_mlme: MLME VDEV comp object
*
* API to print current state/substate