Skip to content
Commit ecf896b9 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Sebastian Reichel
Browse files

power_supply: charger-manager: Fix dereferencing of ERR_PTR



If power_supply_register() fails do not dereference returned ERR_PTR.
The pointer was dereferenced to print name of battery which registration
failed. Instead use the name from the power supply description passed to
the power_supply_register() function.

Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent fbea947c
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