]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: cpu_cooling: Check memory allocation of power_table
authorJavi Merino <javi.merino@arm.com>
Fri, 20 Mar 2015 18:20:13 +0000 (18:20 +0000)
committerEduardo Valentin <edubezval@gmail.com>
Tue, 5 May 2015 04:27:54 +0000 (21:27 -0700)
commit412d01024f0522dba19b40ca9c0429a09c7734eb
treec549490cf55763470c4e07b2767c126a65bec3d8
parent53dd39e98ff05c22d2b14350c7d9764fe28a0cfa
thermal: cpu_cooling: Check memory allocation of power_table

We allocate the power_table in memory but we don't test whether the
allocation succeeded.  Return -ENOMEM if kcalloc() fails.

Fixes: e0128d8ab423 ("thermal: cpu_cooling: implement the power cooling device API")
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/cpu_cooling.c