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

Commit eab398ec authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: qpnp-smbcharger: fix bug in find_closest_in_array"

parents 5929bb3c 281d6b54
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1055,7 +1055,7 @@ static int find_closest_in_array(const int *arr, int len, int val)
	if (len == 0)
		return closest;
	for (i = 0; i < len; i++)
		if (abs(val - arr[i]) < abs(val - closest))
		if (abs(val - arr[i]) < abs(val - arr[closest]))
			closest = i;

	return closest;