linux/drivers/base/test
Chen Zhongjin 9be182da0a driver core: Fix test_async_probe_init saves device in wrong array
In test_async_probe_init, second set of asynchronous devices are saved
in sync_dev[sync_id], which should be async_dev[async_id].
This makes these devices not unregistered when exit.

> modprobe test_async_driver_probe && \
> modprobe -r test_async_driver_probe && \
> modprobe test_async_driver_probe
 ...
> sysfs: cannot create duplicate filename '/devices/platform/test_async_driver.4'
> kobject_add_internal failed for test_async_driver.4 with -EEXIST,
  don't try to register things with the same name in the same directory.

Fixes: 57ea974fb8 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity")
Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com>
Link: https://lore.kernel.org/r/20221125063541.241328-1-chenzhongjin@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-19 17:27:36 +01:00
..
Kconfig device property: Add a blank line in Kconfig of tests 2022-11-23 19:35:31 +01:00
Makefile device property: build kunit tests without structleak plugin 2021-10-06 17:53:42 -06:00
property-entry-test.c device property: Remove some casts in property-entry-test 2021-06-23 16:37:21 -06:00
test_async_driver_probe.c driver core: Fix test_async_probe_init saves device in wrong array 2023-01-19 17:27:36 +01:00