]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: core: Use strnlen() in thermal_zone_device_register_with_trips()
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 16 Dec 2025 13:09:44 +0000 (14:09 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Jan 2026 20:27:07 +0000 (21:27 +0100)
commit1d97b8e3bfbb4fec99054cb5c413652a0ccfdeec
treea4d28808b2c9948890c498f7a479c31a5e4c1482
parent9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
thermal: core: Use strnlen() in thermal_zone_device_register_with_trips()

Replace strlen() with the safer strnlen() and calculate the length of
the thermal zone name 'type' only once.

No functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
[ rjw: Subject edits ]
Link: https://patch.msgid.link/20251216130943.40180-2-thorsten.blum@linux.dev
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_core.c