power: supply: core: simplify with cleanup.h
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 5 Jul 2024 11:31:12 +0000 (13:31 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 27 Aug 2024 09:47:48 +0000 (11:47 +0200)
commita9125e868f7ad80d527cf5c69e20fa0ada96bff9
tree879a15cfe0877ec815be9c7d9e3fd8a3e52f999d
parent17656d2215c3978bbe2811a5e249cd07fe3de77f
power: supply: core: simplify with cleanup.h

Allocate the memory with scoped/cleanup.h to reduce error handling and
make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240705113113.42851-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c