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

Commit 9910e89b authored by Vishalsingh Hajeri's avatar Vishalsingh Hajeri
Browse files

msm: camera: context: Add null check on context pointer



Check for context pointer being null, before accessing its
members.

Change-Id: I778c44e743edddcddf0f2fd6fd49336dfe00baf0
Signed-off-by: default avatarVishalsingh Hajeri <vhajeri@codeaurora.org>
parent afd29190
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ int cam_context_handle_start_dev(struct cam_context *ctx,
{
	int rc = 0;

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

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