esoc: Fix potential NULL pointer dereferences

Update checks to avoid potential NULL pointer dereferences.

Change-Id: Ibb9db8fb44f9e27da9e531b762dfddd9725c1b4f
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
4 files changed