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

Commit 9564d786 authored by Harshdeep Dhatt's avatar Harshdeep Dhatt Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Check the snapshot structure before dereferencing



This is needed to avoid dereferencing a NULL pointer.

Change-Id: I7247cec94ab09664da81dba4030fc74fced78c9c
Signed-off-by: default avatarHarshdeep Dhatt <hdhatt@codeaurora.org>
Signed-off-by: default avatarUrvashi Agrawal <urvaagra@codeaurora.org>
parent 5dfbd900
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2743,8 +2743,10 @@ _aware(struct kgsl_device *device)
				 * GPU will not be powered on
				 */
				WARN_ONCE(1, "Failed to recover GMU\n");
				if (device->snapshot)
					device->snapshot->recovered = false;
			} else {
				if (device->snapshot)
					device->snapshot->recovered = true;
			}