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

Commit 0a453192 authored by Zhaoyang Liu's avatar Zhaoyang Liu Committed by snandini
Browse files

qcacmn: use kzalloc for memory instead of kmalloc

Try to request memory using kzalloc instead of kmalloc.

Change-Id: Ib35097f76257733b3663c112b8255b587ff19bd6
CRs-Fixed: 2706674
parent 8ca3f8e7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -33,10 +33,10 @@
#define __can_sleep() \
	(!in_interrupt() && !irqs_disabled() && !in_atomic())

#define __zalloc_sleeps(size) kmalloc(size, GFP_KERNEL)
#define __zalloc_atomic(size) kmalloc(size, GFP_ATOMIC)
#define __zalloc_sleeps(size) kzalloc(size, GFP_KERNEL)
#define __zalloc_atomic(size) kzalloc(size, GFP_ATOMIC)
#define __zalloc_auto(size) \
	kmalloc(size, __can_sleep() ? GFP_KERNEL : GFP_ATOMIC)
	kzalloc(size, __can_sleep() ? GFP_KERNEL : GFP_ATOMIC)

#define __free(ptr) kfree(ptr)