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

Commit 559fa6e7 authored by Jesper Juhl's avatar Jesper Juhl Committed by Ingo Molnar
Browse files

profile: Use vzalloc() rather than vmalloc() & memset()



There's no reason to memset() manually when we have vzalloc().

Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: William Irwin <wli@holomorphy.com>
LKML-Reference: <alpine.LNX.2.00.1010302150310.1572@swampdragon.chaosbits.net>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3985c7ce
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -126,11 +126,9 @@ int __ref profile_init(void)
	if (prof_buffer)
		return 0;

	prof_buffer = vmalloc(buffer_bytes);
	if (prof_buffer) {
		memset(prof_buffer, 0, buffer_bytes);
	prof_buffer = vzalloc(buffer_bytes);
	if (prof_buffer)
		return 0;
	}

	free_cpumask_var(prof_cpu_mask);
	return -ENOMEM;