Skip to content
Commit c4d33381 authored by Yuan Can's avatar Yuan Can Committed by Sebastian Reichel
Browse files

power: supply: ab8500: Fix error handling in ab8500_charger_init()



The ab8500_charger_init() returns the platform_driver_register() directly
without checking its return value, if platform_driver_register() failed,
all ab8500_charger_component_drivers are not unregistered.

Fix by unregister ab8500_charger_component_drivers when
platform_driver_register() failed.

Fixes: 1c1f13a0 ("power: supply: ab8500: Move to componentized binding")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 97f2b4dd
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