]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: return the correct error code
authorYuanjun Gong <ruc_gongyuanjun@163.com>
Tue, 13 May 2025 12:37:32 +0000 (20:37 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sun, 22 Jun 2025 17:28:53 +0000 (19:28 +0200)
commita9aece5d7e8fa8bc74f1827d2cf1b189ffe7e8c8
treec27a621cf69f695e702a0a1a45119319b8e99f6f
parent22e4d29f081df8a10f1c062d3d952bb876eb9bdc
power: return the correct error code

In POWER_SUPPLY_PROP_MODEL_NAME branch of max1720x_battery_get_property(),
program would return -ENODEV out of FIELD_GET error, but it's better also
considering the error code returned by regmap_read() in case it fails.

Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Link: https://lore.kernel.org/r/20250513123732.3041577-1-ruc_gongyuanjun@163.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/max1720x_battery.c