]> git.ipfire.org Git - thirdparty/u-boot.git/commit
clk: Return value calculated by ERR_PTR
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Fri, 21 Nov 2025 17:34:32 +0000 (17:34 +0000)
committerTom Rini <trini@konsulko.com>
Fri, 5 Dec 2025 23:03:31 +0000 (17:03 -0600)
commitfe780310cfa8bf5a093894b5cd7fe85c6b02fd91
tree0f6758b72f8e8aa90260ee4ea19d724d84fe8baf
parent1c0a46e2918a1ddf42f51449e45077513dd52417
clk: Return value calculated by ERR_PTR

In clk_set_default_get_by_id ret is passed to ERR_PTR but nothing is
done with the value that this calculates which is obviously not the
intention of the code. This is confirmed by the code around where this
function is called.
Instead return the value from ERR_PTR.

Then fixup the sandbox code so that the test dm_test_clk does not fail
as it relied on the broken behaviour.

Finally disable part of the test that does not work correctly with
CLK_AUTO_ID

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
arch/sandbox/include/asm/clk.h
drivers/clk/clk-uclass.c
drivers/clk/clk_sandbox.c
test/dm/clk.c