]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regulator: max14577: Add error check for max14577_read_reg()
authorWentao Liang <vulab@iscas.ac.cn>
Mon, 26 May 2025 02:56:27 +0000 (10:56 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:30 +0000 (11:07 +0100)
commit16f7ee5d8a86c2763751a86f1fed89b50561e5e6
tree9abb0448c499a14f2540c55210d06659e4435ff5
parent20fdc2599eefdd80e69ad50b3885a67f0995b8be
regulator: max14577: Add error check for max14577_read_reg()

commit 65271f868cb1dca709ff69e45939bbef8d6d0b70 upstream.

The function max14577_reg_get_current_limit() calls the function
max14577_read_reg(), but does not check its return value. A proper
implementation can be found in max14577_get_online().

Add a error check for the max14577_read_reg() and return error code
if the function fails.

Fixes: b0902bbeb768 ("regulator: max14577: Add regulator driver for Maxim 14577")
Cc: stable@vger.kernel.org # v3.14
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20250526025627.407-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/regulator/max14577-regulator.c