diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2015-09-28 11:51:27 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-09-28 19:07:48 +0300 |
commit | 2edd69a81dd4e8068bb512ffcc3959c77fc182ea (patch) | |
tree | bcccf783ac3d11be9cf03bc7a2c373767aa618de /drivers/power/intel_mid_battery.c | |
parent | 2202e1fc5a29eab13fab31d287dd2019dc9edaa6 (diff) | |
download | linux-2edd69a81dd4e8068bb512ffcc3959c77fc182ea.tar.xz |
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: 74aab849f342 ('power: bq27xxx_battery: Cleanup health checking')
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/intel_mid_battery.c')
0 files changed, 0 insertions, 0 deletions