]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: at91: peripheral: fix return value
authorBrian Masney <bmasney@redhat.com>
Mon, 11 Aug 2025 15:17:53 +0000 (11:17 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:05 +0000 (16:23 +0200)
commit69fd55ae1294e1476e7d89912fa0bbc7f81db20d
tree444f1433e24e26d1e873c5c3f03f3f423eb382b9
parent8926dae1ebce3ae0ef755d86f6b0e42ff96f8b66
clk: at91: peripheral: fix return value

[ Upstream commit 47b13635dabc14f1c2fdcaa5468b47ddadbdd1b5 ]

determine_rate() is expected to return an error code, or 0 on success.
clk_sam9x5_peripheral_determine_rate() has a branch that returns the
parent rate on a certain case. This is the behavior of round_rate(),
so let's go ahead and fix this by setting req->rate.

Fixes: b4c115c76184f ("clk: at91: clk-peripheral: add support for changeable parent rate")
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/at91/clk-peripheral.c