diff options
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 8547b780bb5..11463c00451 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -932,6 +932,7 @@ bus_uevent_fail: kset_unregister(&bus->p->subsys); kfree(bus->p); out: + bus->p = NULL; return retval; } EXPORT_SYMBOL_GPL(bus_register); @@ -953,6 +954,7 @@ void bus_unregister(struct bus_type *bus) bus_remove_file(bus, &bus_attr_uevent); kset_unregister(&bus->p->subsys); kfree(bus->p); + bus->p = NULL; } EXPORT_SYMBOL_GPL(bus_unregister); |