-
由 Krzysztof Kozlowski 提交于
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: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
ecf896b9