| 0104dcda | 14-Nov-2024 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
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 t
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
show more ...
|
| 1c426fd0 | 10-Nov-2024 |
Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
thermal: testing: Use DEFINE_FREE() and __free() to simplify code
Use DEFINE_FREE() to define a __free function for dropping thermal zone template reference counters and use it along with __free() t
thermal: testing: Use DEFINE_FREE() and __free() to simplify code
Use DEFINE_FREE() to define a __free function for dropping thermal zone template reference counters and use it along with __free() to simplify code in some places.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/4628747.LvFx2qVVIh@rjwysocki.net [ rjw: Add variable initialization to address compiler warning ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|