mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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: Stephen Dickey <[email protected]>
This commit is contained in:
parent
a65504bf2b
commit
f2ddf34094
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue