提交 ce5ee161 编写于 作者: D Dan Carpenter 提交者: Eduardo Valentin

devfreq_cooling: return on allocation failure

If the allocation fails then we can't continue.

Fixes: a76caf55 ('thermal: Add devfreq cooling')
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
上级 7e38a5b1
......@@ -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),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册