Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b182876 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: context: Add null check on context pointer" into dev/msm-4.9-camx

parents 5d0e5978 9910e89b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -355,7 +355,7 @@ int cam_context_handle_start_dev(struct cam_context *ctx,
{
{
	int rc = 0;
	int rc = 0;


	if (!ctx->state_machine) {
	if (!ctx || !ctx->state_machine) {
		CAM_ERR(CAM_CORE, "Context is not ready");
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
		return -EINVAL;
	}
	}
@@ -384,7 +384,7 @@ int cam_context_handle_stop_dev(struct cam_context *ctx,
{
{
	int rc = 0;
	int rc = 0;


	if (!ctx->state_machine) {
	if (!ctx || !ctx->state_machine) {
		CAM_ERR(CAM_CORE, "Context is not ready");
		CAM_ERR(CAM_CORE, "Context is not ready");
		return -EINVAL;
		return -EINVAL;
	}
	}