]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lib: test_objagg: Set error message in check_expect_hints_stats()
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 30 Jun 2025 19:36:40 +0000 (14:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:24:56 +0000 (18:24 +0200)
commit80e9028f5c18c3723d70350ce11d79d6c679296b
treed50be35dde7b11730d047dde51fb05431fd68912
parent71ac65ebd9bf5b9f0a84f0cb6f64896f559a1e94
lib: test_objagg: Set error message in check_expect_hints_stats()

[ Upstream commit e6ed134a4ef592fe1fd0cafac9683813b3c8f3e8 ]

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.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202506281403.DsuyHFTZ-lkp@intel.com/
Fixes: 0a020d416d0a ("lib: introduce initial implementation of object aggregation manager")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/8548f423-2e3b-4bb7-b816-5041de2762aa@sabinyo.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/test_objagg.c