diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-02-21 17:57:11 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-07 18:25:35 +0100 |
| commit | e11df3bffde16fd3b6843aadfb921b5be0f8b55a (patch) | |
| tree | dc7b37e5de39c8aba8b6a10dab6ccf5a14a318b9 /scripts/patch-kernel | |
| parent | 07a82c78d822aa3708794c01690618e075b15b3b (diff) | |
| download | linux-e11df3bffde16fd3b6843aadfb921b5be0f8b55a.tar.gz linux-e11df3bffde16fd3b6843aadfb921b5be0f8b55a.tar.bz2 linux-e11df3bffde16fd3b6843aadfb921b5be0f8b55a.zip | |
thermal/of: Fix cdev lookup in thermal_of_should_bind()
[ Upstream commit 423de5b5bc5b267586b449abd1c4fde562aa0cf9 ]
Since thermal_of_should_bind() terminates the loop after processing
the first child found in cooling-maps, it will never match more than
one cdev to a given trip point which is incorrect, as there may be
cooling-maps associating one trip point with multiple cooling devices.
Address this by letting the loop continue until either all
children have been processed or a matching one has been found.
To avoid adding conditionals or goto statements, put the loop in
question into a separate function and make that function return
right away after finding a matching cooling-maps entry.
Fixes: 94c6110b0b13 ("thermal/of: Use the .should_bind() thermal zone callback")
Link: https://lore.kernel.org/linux-pm/20250219-fix-thermal-of-v1-1-de36e7a590c4@chromium.org/
Reported-by: Yu-Che Cheng <giver@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Yu-Che Cheng <giver@chromium.org>
Tested-by: Yu-Che Cheng <giver@chromium.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Tested-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/2788228.mvXUDI8C0e@rjwysocki.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
