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

Skip to content
Commit 4cfa892c authored by Philip Rakity's avatar Philip Rakity Committed by Anton Vorontsov
Browse files

max17042_battery: Divide by 0 crash because r_sns init too late



On MMP2 brownstone divide by 0 error since probe sets r_sns
after calling power_supply_register.

Move the code up a few lines.  r_sns comes from the platform
data.

PROP_CURRENT_AVG and PROP_CURRENT divide the result by r_sns.

Signed-off-by: default avatarPhilip Rakity <prakity@marvell.com>
Acked-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 45d116ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment