]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal/of: Use kcalloc() instead of kzalloc() with multiplication
authorLukasz Luba <lukasz.luba@arm.com>
Mon, 24 Feb 2025 17:33:03 +0000 (17:33 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Feb 2025 19:55:42 +0000 (20:55 +0100)
commitc65b5c5187439ae940462c83d430204631045d06
treebe2a627ce0a01ef7b5cd7775ffa880ae58b477c1
parente6ca59bb3c8f3fe00a9dc1ec72bcb77cd4ecd242
thermal/of: Use kcalloc() instead of kzalloc() with multiplication

According to the latest recommendations, kcalloc() should be used
instead of kzalloc() with multiplication (which might overflow).

Switch to this new scheme and use more safe kcalloc().

No functional impact.

Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20250224173432.1946070-2-lukasz.luba@arm.com
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_of.c