]> www.infradead.org Git - users/willy/xarray.git/commit
thermal: testing: Initialize some variables annoteded with _free()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 Nov 2024 16:25:09 +0000 (17:25 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 14 Nov 2024 16:40:47 +0000 (17:40 +0100)
commit0104dcdaad3a7afd141e79a5fb817a92ada910ac
tree5bda6e27c82bb79d1fc3633788c0d6617f271c80
parent1c426fd09ca85fb77f120f7933e39eb9df99a39a
thermal: testing: Initialize some variables annoteded with _free()

Variables annotated with __free() need to be initialized if the function
can return before they get updated for the first time or the attempt to
free the memory pointed to by them upon function return may crash the
kernel.

Fix this issue in some places in the thermal testing code.

Fixes: f6a034f2df42 ("thermal: Introduce a debugfs-based testing facility")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/12576267.O9o76ZdvQC@rjwysocki.net
drivers/thermal/testing/zone.c