Skip to content

Commit

Permalink
max8997_charger: Fix unsigned value for less than zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonghwan Choi authored and Anton Vorontsov committed Nov 24, 2011
1 parent 47f0ac2 commit 44abd77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/max8997_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 44abd77

Please sign in to comment.