diff options
author | Jonghwan Choi <jhbird.choi@gmail.com> | 2011-10-28 18:56:32 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2011-11-24 17:56:21 -0500 |
commit | 44abd774f52999125d499aed17a2f70211c34dcd (patch) | |
tree | dd1d0c32143831240cc52ef46efd1a1bcb8edada /drivers/power | |
parent | 47f0ac2b0a8c7f26b513a2a18045219b030aedf1 (diff) |
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 <jhbird.choi@gmail.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/max8997_charger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/max8997_charger.c b/drivers/power/max8997_charger.c index e12b4a2a0be2..6e88c5d026b9 100644 --- a/drivers/power/max8997_charger.c +++ b/drivers/power/max8997_charger.c | |||
@@ -97,7 +97,7 @@ static __devinit int max8997_battery_probe(struct platform_device *pdev) | |||
97 | return -EINVAL; | 97 | return -EINVAL; |
98 | 98 | ||
99 | if (pdata->eoc_mA) { | 99 | if (pdata->eoc_mA) { |
100 | u8 val = (pdata->eoc_mA - 50) / 10; | 100 | int val = (pdata->eoc_mA - 50) / 10; |
101 | if (val < 0) | 101 | if (val < 0) |
102 | val = 0; | 102 | val = 0; |
103 | if (val > 0xf) | 103 | if (val > 0xf) |