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

Commit 9b40a69e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sde: rotator: Add null pointer checks" into dev/msm-4.14-display

parents fae99b26 4fb00b4e
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -1077,6 +1077,7 @@ struct sde_rotator_ctx *sde_rotator_ctx_open(
	mutex_unlock(&rot_dev->lock);
error_lock:
	kfree(ctx);
	ctx = NULL;
	return ERR_PTR(ret);
}

@@ -1089,10 +1090,18 @@ struct sde_rotator_ctx *sde_rotator_ctx_open(
static int sde_rotator_ctx_release(struct sde_rotator_ctx *ctx,
		struct file *file)
{
	struct sde_rotator_device *rot_dev = ctx->rot_dev;
	u32 session_id = ctx->session_id;
	struct sde_rotator_device *rot_dev;
	u32 session_id;
	struct list_head *curr, *next;

	if (!ctx) {
		SDEROT_DBG("ctx is NULL\n");
		return -EINVAL;
	}

	rot_dev = ctx->rot_dev;
	session_id = ctx->session_id;

	ATRACE_END(ctx->kobj.name);

	SDEDEV_DBG(rot_dev->dev, "release s:%d\n", session_id);