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: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
Showing
想要评论请 注册 或 登录