lib: test_objagg: Set error message in check_expect_hints_stats()
Subsystems (5)
PATCH 1/1 lib: test_objagg: Set error message in check_expect_hints_stats()
Smatch complains that the error message isn't set in the caller:
lib/test_objagg.c:923 test_hints_case2()
error: uninitialized symbol 'errmsg'.
This static checker warning only showed up after a recent refactoring but the bug dates back to when the code was originally added. This likely doesn't affect anything in real life.
--- lib/test_objagg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/test_objagg.c +3 -1
@@ -899,8 +899,10 @@ static int check_expect_hints_stats(struct objagg_hints *objagg_hints,int err; stats =objagg_hints_stats_get (objagg_hints); -if (IS_ERR (stats)) +if (IS_ERR (stats)) { + *errmsg ="objagg_hints_stats_get() failed." ;return PTR_ERR (stats); + } err =__check_expect_stats (stats, expect_stats, errmsg);objagg_stats_put (stats);return err;
Signature · 1 line
2.47.2
Quoted 5 lines · Dan Carpenter
Smatch complains that the error message isn't set in the caller:
lib/test_objagg.c:923test_hints_case2()
error: uninitialized symbol 'errmsg'.
Quoted 8 lines
This static checker warning only showed up after a recent refactoring but the bug dates back to when the code was originally added. This likely doesn't affect anything in real life.
Reported-by kernel test robot <[email protected]>Fixes 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager")Signed-off-by Dan Carpenter <[email protected]>
Quoted 5 lines · Dan Carpenter
Smatch complains that the error message isn't set in the caller:
lib/test_objagg.c:923test_hints_case2()
error: uninitialized symbol 'errmsg'.
Quoted 8 lines
This static checker warning only showed up after a recent refactoring but the bug dates back to when the code was originally added. This likely doesn't affect anything in real life.
Reported-by kernel test robot <[email protected]>Fixes 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager")Signed-off-by Dan Carpenter <[email protected]>
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Mon, 30 Jun 2025 14:36:40 -0500 you wrote:
Smatch complains that the error message isn't set in the caller:
lib/test_objagg.c:923test_hints_case2()
error: uninitialized symbol 'errmsg'.This static checker warning only showed up after a recent refactoring but the bug dates back to when the code was originally added. This likely doesn't affect anything in real life.
[...]
Here is the summary with links:
- [net] lib: test_objagg: Set error message in check_expect_hints_stats()
https://git.kernel.org/netdev/net/c/e6ed134a4ef5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html