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

Commit 8fad0a3b authored by Harshdeep Dhatt's avatar Harshdeep Dhatt
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>
parent be27e35c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2732,8 +2732,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;
			}