diff options
| author | Andrew Goodbody <[email protected]> | 2025-11-21 17:34:32 +0000 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-05 17:03:31 -0600 |
| commit | fe780310cfa8bf5a093894b5cd7fe85c6b02fd91 (patch) | |
| tree | 0f6758b72f8e8aa90260ee4ea19d724d84fe8baf /arch | |
| parent | 1c0a46e2918a1ddf42f51449e45077513dd52417 (diff) | |
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 <[email protected]>
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/sandbox/include/asm/clk.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/clk.h b/arch/sandbox/include/asm/clk.h index 37fe49c7fcf..2d3318cdcc4 100644 --- a/arch/sandbox/include/asm/clk.h +++ b/arch/sandbox/include/asm/clk.h @@ -50,6 +50,7 @@ enum sandbox_clk_test_id { struct sandbox_clk_priv { bool probed; + struct clk clk; ulong rate[SANDBOX_CLK_ID_COUNT]; bool enabled[SANDBOX_CLK_ID_COUNT]; bool requested[SANDBOX_CLK_ID_COUNT]; |
