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

Skip to content
Commit 2edd69a8 authored by Andrzej Hajda's avatar Andrzej Hajda Committed by Sebastian Reichel
Browse files

power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health()

We need flags to be signed for the error handling to work.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576



Fixes: 74aab849 ('power: bq27xxx_battery: Cleanup health checking')
Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-By: default avatarPali Rohár <pali.rohar@gmail.com>
Acked-by: default avatarAndrew F. Davis <afd@ti.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 2202e1fc
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