Skip to content
Commit 4baf1cc5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Tzung-Bi Shih
Browse files

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: c6ed48ef ("power: supply: add ChromeOS EC based charge control driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Acked-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/ZoWKEs4mCqeLyTOB@stanley.mountain


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent c98f17fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment