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

Commit f2ddf340 authored by Stephen Dickey's avatar Stephen Dickey
Browse files

devfreq: memlat: correct null pointer derference



alloc_attr() might return NULL on memory allocation
failure which would lead to NULL pointer
de-reference, fix it by adding NULL check.

Change-Id: Iec7fee76a29c85355142a8bb475e2416807debd5
Signed-off-by: default avatarStephen Dickey <dickey@codeaurora.org>
parent a65504bf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -366,6 +366,9 @@ static int memlat_hp_restart_events(unsigned int cpu, bool cpu_up)
	unsigned int idx;
	struct event_data *common_evs;

	if (!attr)
		return -ENOMEM;

	if (!cpu_grp)
		goto exit;