Files
linux-stable-mirror/tools/testing/cxl
Dave JiangandGreg Kroah-Hartman 096e185adf cxl/test: Add check after kzalloc() memory in alloc_mock_res()
[ Upstream commit dfe28c8592 ]

alloc_mock_res() calls kzalloc() without checking the return value.
Add scope based resource management to deal with the allocated memory
cleanly.

Reported-by: sashiko-bot
Fixes: 67dcdd4d3b ("tools/testing/cxl: Introduce a mocked-up CXL port hierarchy")
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260611230305.197390-1-dave.jiang@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-07-24 15:54:42 +02:00
..