Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 773fb69e authored by Andreas Kemnade's avatar Andreas Kemnade Committed by Greg Kroah-Hartman
Browse files

power: supply: twl4030_charger: fix charging current out-of-bounds



[ Upstream commit 8314c212f995bc0d06b54ad02ef0ab4089781540 ]

the charging current uses unsigned int variables, if we step back
if the current is still low, we would run into negative which
means setting the target to a huge value.
Better add checks here.

Signed-off-by: default avatarAndreas Kemnade <andreas@kemnade.info>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0729f87b
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