diff options
author | Daniel Lezcano <[email protected]> | 2023-04-04 09:51:35 +0200 |
---|---|---|
committer | Daniel Lezcano <[email protected]> | 2023-04-07 18:36:28 +0200 |
commit | 8454c8c09c7768fd86cda61f1a07b9c746050c80 (patch) | |
tree | 4fca42ea26ec882712c6cb3c52ac90711a554961 /lib/mpi/mpi-mod.c | |
parent | 561538f770a362e704fa0f1b2f2fe78c8e61db6b (diff) |
thermal/drivers/bcm2835: Remove buggy call to thermal_of_zone_unregister
The driver is using the devm_thermal_of_zone_device_register().
In the error path of the function calling
devm_thermal_of_zone_device_register(), the function
devm_thermal_of_zone_unregister() should be called instead of
thermal_of_zone_unregister(), otherwise this one will be called twice
when the device is freed.
The same happens for the remove function where the devm_ guarantee the
thermal_of_zone_unregister() will be called, so adding this call in
the remove function will lead to a double free also.
Use devm_ variant in the error path of the probe function.
Remove thermal_of_zone_unregister() in the remove function.
Cc: Florian Fainelli <[email protected]>
Cc: Ray Jui <[email protected]>
Cc: Scott Branden <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions