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

Commit 71963395 authored by Hareesh Gundu's avatar Hareesh Gundu Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Fix potential device NULL pointer dereferences



Ensure that device pointer isn't NULL before using it in
kgsl_snapshot_save_frozen_objs().

Change-Id: I676dfa5567b1d09427e3e7691045fabc71b53d43
Signed-off-by: default avatarHareesh Gundu <hareeshg@codeaurora.org>
parent 758693b4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1067,6 +1067,9 @@ void kgsl_snapshot_save_frozen_objs(struct work_struct *work)
	size_t size = 0;
	void *ptr;

	if (IS_ERR_OR_NULL(device))
		return;

	kgsl_snapshot_process_ib_obj_list(snapshot);

	list_for_each_entry(obj, &snapshot->obj_list, node) {