diff options
| author | Mario Limonciello <[email protected]> | 2024-02-17 02:23:11 +0000 |
|---|---|---|
| committer | Hans de Goede <[email protected]> | 2024-02-20 13:35:36 +0000 |
| commit | 427c70dec738318b7f71e1b9d829ff0e9771d493 (patch) | |
| tree | d7eea25f0e45f4c977a9e35d1542fb03f7d2c8ce /scripts/generate_rust_target.rs | |
| parent | platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler (diff) | |
| download | kernel-427c70dec738318b7f71e1b9d829ff0e9771d493.tar.gz kernel-427c70dec738318b7f71e1b9d829ff0e9771d493.zip | |
platform/x86: thinkpad_acpi: Only update profile if successfully converted
Randomly a Lenovo Z13 will trigger a kernel warning traceback from this
condition:
```
if (WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names))))
```
This happens because thinkpad-acpi always assumes that
convert_dytc_to_profile() successfully updated the profile. On the
contrary a condition can occur that when dytc_profile_refresh() is called
the profile doesn't get updated as there is a -EOPNOTSUPP branch.
Catch this situation and avoid updating the profile. Also log this into
dynamic debugging in case any other modes should be added in the future.
Fixes: c3bfcd4c6762 ("platform/x86: thinkpad_acpi: Add platform profile support")
Signed-off-by: Mario Limonciello <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
0 files changed, 0 insertions, 0 deletions
