diff options
| author | Ethan Tidmore <ethantidmore06@gmail.com> | 2026-04-03 02:09:28 -0500 |
|---|---|---|
| committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2026-04-09 15:01:11 +0300 |
| commit | 6b0567dc4c9ad140044400e06dd97fdce12c204f (patch) | |
| tree | 104122f468b102509fae2ce3d23bf898e57af434 /tools/lib/python/kdoc/python_version.py | |
| parent | f8fd138c2363c0e2d3235c32bfb4fb5c6474e4ae (diff) | |
platform/x86: uniwill-laptop: Fix signedness bug
The function sysfs_match_string() can return negative error codes and
the variable assigned to it is the enum 'option'. Which could be an
unsigned int due to different compiler implementations.
Assign signed variable 'ret' to sysfs_match_string(), check for error,
then assign ret to option.
Detected by Smatch:
drivers/platform/x86/uniwill/uniwill-acpi.c:919 usb_c_power_priority_store()
warn: unsigned 'option' is never less than zero.
Fixes: 03ae0a0d0973b ("platform/x86: uniwill-laptop: Implement USB-C power priority setting")
Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com>
Link: https://patch.msgid.link/20260403070928.802196-1-ethantidmore06@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
