power: supply: ucs1002: fix error code in ucs1002_get_property()
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 19 Jun 2023 09:44:17 +0000 (12:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:48 +0000 (14:56 +0200)
commit33ed60d8b961fca23a96f3a2f0c7c142c6ec5455
treefffc1b46d4d86d71e4954f3b1a32c3401a200d3b
parent1ec48a9fac7d07c70e12147949e4941b1c2db3d2
power: supply: ucs1002: fix error code in ucs1002_get_property()

[ Upstream commit e35059949daa83f8dadf710d0f829ab3c3a72fe2 ]

This function is supposed to return 0 for success instead of returning
the val->intval.  This makes it the same as the other case statements
in this function.

Fixes: 81196e2e57fc ("power: supply: ucs1002: fix some health status issues")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/687f64a4-4c6e-4536-8204-98ad1df934e5@moroto.mountain
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/ucs1002_power.c