Merge 7565fdb5b300a2c75b82c6cbfc8138546cdbc3c3 on remote branch

Change-Id: I6ed5127411792b2eb3594062441fb027ab041a3d
diff --git a/st_hw_session_lsm.c b/st_hw_session_lsm.c
index ba8154a..735f7f0 100644
--- a/st_hw_session_lsm.c
+++ b/st_hw_session_lsm.c
@@ -1287,6 +1287,11 @@
     int event_status, request;
     st_hw_sess_event_t hw_sess_event; /* used to report event to st_session */
 
+    if (p_lsm_ses == NULL) {
+        ALOGE("%s: ERROR. null context.. exiting", __func__);
+        return NULL;
+    }
+
 #ifdef ENABLE_SVA_MIXER_CTL
     struct mixer * st_mixer = NULL;
     st_mixer = p_lsm_ses->common.stdev->mixer;
@@ -1304,10 +1309,6 @@
     }
 #endif
 
-    if (p_lsm_ses == NULL) {
-        ALOGE("%s: ERROR. null context.. exiting", __func__);
-        return NULL;
-    }
     ALOGD("%s:[%d] Enter", __func__, p_lsm_ses->common.sm_handle);
 
     setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_DEFAULT);