Skip to content
Commit a50b0dbb authored by Srikant Ritolia's avatar Srikant Ritolia Committed by Sebastian Reichel
Browse files

power: supply: max8997_charger: Using device managed API and remove OOM print



Use managed resource function devm_power_supply_register instead of
power_supply_register to simplify the error path by allowing unregistering
to happen automatically on error and remove.
Removing max8997_battery_remove function also as it is now redundant.

Also removing out of memory printk message after kzalloc as there is
already enough information on failure.

Signed-off-by: default avatarSrikant Ritolia <s.ritolia@samsung.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 50111d3f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment