msm: ADSPRPC: Null check for file session context during release

While releasing the device, check if the file session context is NULL
to make sure we are not dereferencing it during file free.

Change-Id: I310271189cf710b81c5182b936189fd57ddedd7b
Acked-by: Vishnu Karthik <vikarthi@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index 1795722..521a974 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -1840,6 +1840,10 @@
 	hlist_del_init(&fl->hn);
 	spin_unlock(&fl->apps->hlock);
 
+	if (!fl->sctx) {
+		kfree(fl);
+		return 0;
+	}
 	(void)fastrpc_release_current_dsp_process(fl);
 	fastrpc_context_list_dtor(fl);
 	fastrpc_buf_list_free(fl);