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

Skip to content
Commit 5e5822f6 authored by Vaishali Thakkar's avatar Vaishali Thakkar Committed by Sebastian Reichel
Browse files

power_supply: max8998: Use devm_power_supply_register



Use managed resource function devm_power_supply_register instead
of power_supply_register to simplify the error path by allowing
unregister to happen automatically on error. To be compatible with
the change, replace various gotos by direct returns and remove
unneeded label err.

Also, remove max8998_battery_remove as it is now redundant.

Signed-off-by: default avatarVaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 75ea8ca8
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