]> www.infradead.org Git - users/jedix/linux-maple.git/commit
thermal/debugfs: replace kzalloc() with kcalloc() in thermal_debug_tz_add()
authorEthan Carter Edwards <ethan@ethancedwards.com>
Sat, 22 Feb 2025 20:02:42 +0000 (15:02 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Feb 2025 19:48:07 +0000 (20:48 +0100)
commite6ca59bb3c8f3fe00a9dc1ec72bcb77cd4ecd242
treeb9a3f6fa77f691d33a534fb5ec7ce18eeb21a43b
parentd082ecbc71e9e0bf49883ee4afd435a77a5101b6
thermal/debugfs: replace kzalloc() with kcalloc() in thermal_debug_tz_add()

Work is under way to get rid of all multiplications from allocation
functions to prevent integer overflows [1].

Here the multiplication is obviously safe, but using kcalloc() is more
appropriate and improves readability.

This change has no effect on runtime behavior.

Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
Link: https://patch.msgid.link/20250222-thermal_kcalloc-v1-1-9f7a747fbed7@ethancedwards.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_debugfs.c