diff options
Diffstat (limited to 'drivers/base/bus.c')
-rw-r--r-- | drivers/base/bus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 7ff5aafe2167..f299e0d6abc4 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
@@ -622,7 +622,8 @@ int bus_add_driver(struct device_driver *drv) | |||
622 | if (error) | 622 | if (error) |
623 | goto out_put_bus; | 623 | goto out_put_bus; |
624 | drv->kobj.kset = &bus->drivers; | 624 | drv->kobj.kset = &bus->drivers; |
625 | if ((error = kobject_register(&drv->kobj))) | 625 | error = kobject_register(&drv->kobj); |
626 | if (error) | ||
626 | goto out_put_bus; | 627 | goto out_put_bus; |
627 | 628 | ||
628 | if (drv->bus->drivers_autoprobe) { | 629 | if (drv->bus->drivers_autoprobe) { |
@@ -772,7 +773,8 @@ static int bus_add_attrs(struct bus_type * bus) | |||
772 | 773 | ||
773 | if (bus->bus_attrs) { | 774 | if (bus->bus_attrs) { |
774 | for (i = 0; attr_name(bus->bus_attrs[i]); i++) { | 775 | for (i = 0; attr_name(bus->bus_attrs[i]); i++) { |
775 | if ((error = bus_create_file(bus,&bus->bus_attrs[i]))) | 776 | error = bus_create_file(bus,&bus->bus_attrs[i]); |
777 | if (error) | ||
776 | goto Err; | 778 | goto Err; |
777 | } | 779 | } |
778 | } | 780 | } |