Commit daae9c1
committed
thermal: core: Free thermal zone ID later during removal
The thermal zone removal ordering is different from the thermal zone
registration rollback path ordering and the former is arguably
problematic because freeing a thermal zone ID prematurely may cause
it to be used during the registration of another thermal zone which
may fail as a result.
Prevent that from occurring by changing the thermal zone removal
ordering to reflect the thermal zone registration rollback path
ordering.
Also more the ida_destroy() call from thermal_zone_device_unregister()
to thermal_release() for consistency.
Fixes: b31ef82 ("thermal core: convert ID allocation to IDA")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/5063934.GXAFRqVoOG@rafael.j.wysocki1 parent 41ff66b commit daae9c1
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
| 968 | + | |
968 | 969 | | |
969 | 970 | | |
970 | 971 | | |
| |||
1729 | 1730 | | |
1730 | 1731 | | |
1731 | 1732 | | |
1732 | | - | |
1733 | | - | |
1734 | 1733 | | |
1735 | 1734 | | |
1736 | 1735 | | |
1737 | 1736 | | |
1738 | 1737 | | |
1739 | 1738 | | |
1740 | 1739 | | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
1741 | 1743 | | |
1742 | 1744 | | |
1743 | 1745 | | |
| |||
0 commit comments