mirror of https://github.com/torvalds/linux.git
If KUnit is built as a module, and it's unloaded, the kunit_bus is not
unregistered. This causes an error if it's then re-loaded later, as we
try to re-register the bus.
Unregister the bus and root_device on shutdown, if it looks valid.
In addition, be more specific about the value of kunit_bus_device. It
is:
- a valid struct device* if the kunit_bus initialised correctly.
- an ERR_PTR if it failed to initialise.
- NULL before initialisation and after shutdown.
Fixes:
|
||
|---|---|---|
| .. | ||
| .kunitconfig | ||
| Kconfig | ||
| Makefile | ||
| assert.c | ||
| attributes.c | ||
| debugfs.c | ||
| debugfs.h | ||
| device-impl.h | ||
| device.c | ||
| executor.c | ||
| executor_test.c | ||
| hooks-impl.h | ||
| hooks.c | ||
| kunit-example-test.c | ||
| kunit-test.c | ||
| resource.c | ||
| static_stub.c | ||
| string-stream-test.c | ||
| string-stream.c | ||
| string-stream.h | ||
| test.c | ||
| try-catch-impl.h | ||
| try-catch.c | ||