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

Commit 44abd774 authored by Jonghwan Choi's avatar Jonghwan Choi Committed by Anton Vorontsov
Browse files

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: default avatarJonghwan Choi <jhbird.choi@gmail.com>
Acked-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 47f0ac2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)