Merge "msm: kgsl: Access map_count only if entry is successfully allocated"

This commit is contained in:
qctecmdr 2021-02-25 22:06:53 -08:00 • committed by Gerrit - the friendly Code Review server
commit bb5fc77fb3

View file

@ -252,9 +252,9 @@ static struct kgsl_mem_entry *kgsl_mem_entry_create(void)
kref_init(&entry->refcount);
/* put this ref in userspace memory alloc and map ioctls */
kref_get(&entry->refcount);
atomic_set(&entry->map_count, 0);
}
atomic_set(&entry->map_count, 0);
return entry;
}