]> git.karo-electronics.de Git - linux-beck.git/commit
thermal: core: use kzalloc(sizeof(*ptr),...)
authorEduardo Valentin <edubezval@gmail.com>
Tue, 8 Nov 2016 05:09:25 +0000 (21:09 -0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 23 Nov 2016 02:06:12 +0000 (10:06 +0800)
commit95e3ed1513494aa2d0aaba7a99fb7aa8b51dcfc8
tree15319f30bef7d11b39b0d2c5f657cd505149d499
parent38e7b549af829ad2abd94b60e555227a15f9ecff
thermal: core: use kzalloc(sizeof(*ptr),...)

As a safety check, this patch changes thermal
core to check for pointer content size, instead of type size,
while allocating memory.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/thermal_core.c