diff options
author | Krzysztof Kozlowski <k.kozlowski@samsung.com> | 2015-03-24 10:58:43 +0300 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-03-24 15:40:14 +0300 |
commit | ecf896b97de9757fd835034ad849680218babc93 (patch) | |
tree | f092533f379bc3f6360d977b1583ead5d46c48cc /drivers/regulator/anatop-regulator.c | |
parent | fbea947c7d122f4704001fac2a96b617f767037a (diff) | |
download | linux-ecf896b97de9757fd835034ad849680218babc93.tar.xz |
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: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/regulator/anatop-regulator.c')
0 files changed, 0 insertions, 0 deletions