mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
devfreq_cooling: return on allocation failure
If the allocation fails then we can't continue.
Fixes: a76caf55e5 ('thermal: Add devfreq cooling')
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
This commit is contained in:
parent
7e38a5b1da
commit
ce5ee16112
1 changed files with 1 additions and 1 deletions
|
|
@ -397,7 +397,7 @@ static int devfreq_cooling_gen_tables(struct devfreq_cooling_device *dfc)
|
|||
power_table = kcalloc(num_opps, sizeof(*power_table),
|
||||
GFP_KERNEL);
|
||||
if (!power_table)
|
||||
ret = -ENOMEM;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
freq_table = kcalloc(num_opps, sizeof(*freq_table),
|
||||
|
|
|
|||
Loading…
Reference in a new issue