summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-12-05 17:03:36 -0600
committerTom Rini <[email protected]>2025-12-05 17:03:36 -0600
commitbc1819331ece7aa4e7d0573c9cdacdb8efbdb067 (patch)
tree9a669ac84720f4530171d90dac826e057e5b216c /test
parent1165e8efcba0ab3efd1ea4ff956d26746fc386b0 (diff)
parent33285945518731ed459680ffb01891c4804fb6c9 (diff)
Merge patch series "clk: Return value calculated by ERR_PTR"
Andrew Goodbody <[email protected]> says: Smatch reported an error where a value calculated by ERR_PTR was not used. Fixing this to return the generated value led to a test failure which meant updating the sandbox clock code so that it would still cause the tests to pass with the above correction. Debugging this problem led to a SIGSEGV which is addressed in 1/3. Possible memory leaks noticed are addressed in 3/3. Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'test')
-rw-r--r--test/dm/clk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/dm/clk.c b/test/dm/clk.c
index 790968e6477..c3363796498 100644
--- a/test/dm/clk.c
+++ b/test/dm/clk.c
@@ -89,8 +89,9 @@ static int dm_test_clk(struct unit_test_state *uts)
SANDBOX_CLK_TEST_ID_SPI));
ut_asserteq(0, sandbox_clk_test_get_rate(dev_test,
SANDBOX_CLK_TEST_ID_I2C));
- ut_asserteq(321, sandbox_clk_test_get_rate(dev_test,
- SANDBOX_CLK_TEST_ID_DEVM1));
+ if (!CONFIG_IS_ENABLED(CLK_AUTO_ID))
+ ut_asserteq(321, sandbox_clk_test_get_rate(dev_test,
+ SANDBOX_CLK_TEST_ID_DEVM1));
ut_asserteq(0, sandbox_clk_test_get_rate(dev_test,
SANDBOX_CLK_TEST_ID_DEVM2));