Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133448
b: refs/heads/master
c: f48f3fe
h: refs/heads/master
v: v3
  • Loading branch information
Dave Young authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent d4f72db commit 2d9b755
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5779a583ddb9916b37cfbb916dc53ec2eaf0b9b
refs/heads/master: f48f3febb2cbfd0f2ecee7690835ba745c1034a4
2 changes: 2 additions & 0 deletions trunk/drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ int bus_register(struct bus_type *bus)
kset_unregister(&bus->p->subsys);
kfree(bus->p);
out:
bus->p = NULL;
return retval;
}
EXPORT_SYMBOL_GPL(bus_register);
Expand All @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/base/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ int driver_register(struct device_driver *drv)
int ret;
struct device_driver *other;

BUG_ON(!drv->bus->p);

if ((drv->bus->probe && drv->probe) ||
(drv->bus->remove && drv->remove) ||
(drv->bus->shutdown && drv->shutdown))
Expand Down

0 comments on commit 2d9b755

Please sign in to comment.