Message ID | 20240418131754.58217-2-wander@redhat.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Brendan Higgins |
Headers | show |
Series | kunit: fix minor error path mistakes | expand |
> kunit_init_device() should unregister the device on bus register error.
* Would another imperative wording be desirable also for this change description?
* Will the tag “Fixes” become relevant here?
Regards,
Markus
On Thu, Apr 18, 2024 at 12:06 PM Markus Elfring <Markus.Elfring@web.de> wrote: > > > kunit_init_device() should unregister the device on bus register error. > > * Would another imperative wording be desirable also for this change description? It makes sense, I will change the comment description. > > * Will the tag “Fixes” become relevant here? I often forget this tag. I will add it. > > Regards, > Markus >
diff --git a/lib/kunit/device.c b/lib/kunit/device.c index abc603730b8e..25c81ed465fb 100644 --- a/lib/kunit/device.c +++ b/lib/kunit/device.c @@ -51,7 +51,7 @@ int kunit_bus_init(void) error = bus_register(&kunit_bus_type); if (error) - bus_unregister(&kunit_bus_type); + root_device_unregister(kunit_bus_device); return error; }
kunit_init_device() should unregister the device on bus register error. Signed-off-by: Wander Lairson Costa <wander@redhat.com> --- lib/kunit/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)