9
0
Fork 0

device: init bus list

bus_list is only initialized when the device has a bus, but it
needs to be initialized in unregister_device, so initialize the
list unconditionally.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2014-01-14 10:22:55 +01:00
parent 29ea8bcd94
commit f0bd826abe
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ int register_device(struct device_d *new_device)
INIT_LIST_HEAD(&new_device->cdevs);
INIT_LIST_HEAD(&new_device->parameters);
INIT_LIST_HEAD(&new_device->active);
INIT_LIST_HEAD(&new_device->bus_list);
if (new_device->bus) {
if (!new_device->parent)