diff options
author | 2024-07-04 10:20:03 -0500 | |
---|---|---|
committer | 2024-07-05 01:51:33 +0000 | |
commit | 4baf1cc54433ff7c6e5178517bc8768001416681 (patch) | |
tree | b3557a25637a221544ab76bd3e28632f4dc1fb47 /scripts/generate_rust_analyzer.py | |
parent | power: supply: cros_charge-control: Avoid accessing attributes out of bounds (diff) | |
download | linux-rng-4baf1cc54433ff7c6e5178517bc8768001416681.tar.xz linux-rng-4baf1cc54433ff7c6e5178517bc8768001416681.zip |
power: supply: cros_charge-control: Fix signedness bug in charge_behaviour_store()
The C standard is vague about the signedness of enums, but in this case
here, they are treated as unsigned so the error handling does not work.
Use an int type to fix this.
Fixes: c6ed48ef5259 ("power: supply: add ChromeOS EC based charge control driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/ZoWKEs4mCqeLyTOB@stanley.mountain
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions