mirror of
https://github.com/torvalds/linux.git
synced 2024-11-30 08:01:59 +00:00
427c70dec7
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:
|
||
---|---|---|
.. | ||
chrome | ||
goldfish | ||
loongarch | ||
mellanox | ||
mips | ||
olpc | ||
surface | ||
x86 | ||
Kconfig | ||
Makefile |