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

Commit 2d31757c authored by Ryan Mallon's avatar Ryan Mallon Committed by Anton Vorontsov
Browse files

ds2782_battery: Fix ds2782_get_capacity return value



The ds2782_get_capacity function should return 0 on success, not the
capacity value.

Signed-off-by: default avatarRyan Mallon <ryan@bluewatersys.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 7e27d6e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -163,7 +163,7 @@ static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
	if (err)
		return err;
	*capacity = raw;
	return raw;
	return 0;
}

static int ds2786_get_current(struct ds278x_info *info, int *current_uA)