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:
parent
29ea8bcd94
commit
f0bd826abe
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue