cxl/test: Unregister cxl_acpi in cxl_test_init() error path
Dave Jiang
maintainerPATCH 1/1 cxl/test: Unregister cxl_acpi in cxl_test_init() error path
In cxl_test_init(), Once cxl_mock_platform_device_add() succeeds, all error paths after needs to call platform_device_unregister() instead of platform_device_put() to clean up.
--- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/cxl/test/cxl.c +1 -1
@@ -1955,7 +1955,7 @@ static __init int cxl_test_init(void) err_mem:cxl_mem_exit (); err_root: -platform_device_put (cxl_acpi); +platform_device_unregister (cxl_acpi); err_rch:cxl_rch_topo_exit (); err_single:
base-commit: 4549871118cf616eecdd2d939f78e3b9e1dddc48
prerequisite-patch-id: 1368e94a3bbc2945c2eb36ac72bd6ab8a10650de
Signature · 1 line
2.54.0
Quoted 3 lines · Dave Jiang
In
cxl_test_init(), Oncecxl_mock_platform_device_add()succeeds, all error paths after needs to callplatform_device_unregister()instead ofplatform_device_put()to clean up.
Quoted 7 lines · Dave Jiang
In
cxl_test_init(), Oncecxl_mock_platform_device_add()succeeds, all error paths after needs to callplatform_device_unregister()instead ofplatform_device_put()to clean up.Fixes 67dcdd4d3b83 ("tools/testing/cxl: Introduce a mocked-up CXL port hierarchy")Reported-by sashiko-botSigned-off-by Dave Jiang <[email protected]>
Applied to cxl/next50cc34be04a0
Quoted 20 lines
--- tools/testing/cxl/test/cxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/cxl/test/cxl.c +1
-1@@ -1955,7 +1955,7 @@ static __init int cxl_test_init(void) err_mem:cxl_mem_exit (); err_root: -platform_device_put (cxl_acpi); +platform_device_unregister (cxl_acpi); err_rch:cxl_rch_topo_exit (); err_single:base-commit:
4549871118cf616eecdd2d939f78e3b9e1dddc48
prerequisite-patch-id:1368e94a3bbc2945c2eb36ac72bd6ab8a10650de