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

Commit f55c823c authored by Shrenuj Bansal's avatar Shrenuj Bansal
Browse files

msm: kgsl: Adds NULL check for drawctxt ops



There is a code path which leaves drawctxt->ops uninitialized and
and calls adreno_drawctxt_detach. Adds a check to make sure we
do not dereference a NULL pointer.

Change-Id: I9d1aa5deb0addeb3eea6d375f197669ccd89cfd4
Signed-off-by: default avatarShrenuj Bansal <shrenujb@codeaurora.org>
parent 76029f38
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ int adreno_drawctxt_detach(struct kgsl_context *context)

	adreno_profile_process_results(device);

	if (drawctxt->ops->detach)
	if (drawctxt->ops && drawctxt->ops->detach)
		drawctxt->ops->detach(drawctxt);

	/* wake threads waiting to submit commands from this context */