mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
max8997_charger: Fix unsigned value for less than zero
The 'val' is a 'unsigned char', so it is never less than zero. Signed-off-by: Jonghwan Choi <[email protected]> Acked-by: MyungJoo Ham <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
47f0ac2b0a
commit
44abd774f5
1 changed files with 1 additions and 1 deletions
|
|
@ -97,7 +97,7 @@ static __devinit int max8997_battery_probe(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
|
||||
if (pdata->eoc_mA) {
|
||||
u8 val = (pdata->eoc_mA - 50) / 10;
|
||||
int val = (pdata->eoc_mA - 50) / 10;
|
||||
if (val < 0)
|
||||
val = 0;
|
||||
if (val > 0xf)
|
||||
|
|
|
|||
Loading…
Reference in a new issue