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: Hareesh Gundu <hareeshg@codeaurora.org>
This commit is contained in:
Hareesh Gundu 2016-09-30 15:00:32 +05:30 committed by Gerrit - the friendly Code Review server
parent 758693b4a6
commit 71963395a5

View file

@ -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) {