msm: camera: icp: Validate ctx during hw release

The change validates the ctx passed as input to hw release
function. If ctx is invalid the function returns with an error.
Currently there is no return when an invalid ctx is
encountered leading to an out of bounds read.

Change-Id: I7fcf955dfb9ac12d85ea75a726597a44f5b9e63a
Signed-off-by: Karthik Anantha Ram <kartanan@codeaurora.org>
1 file changed