diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2007-07-09 14:39:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:02 -0400 |
commit | dc0afa8388972a9ed7c2203cc46d8df1a4713f65 (patch) | |
tree | a4693ef5ac039e868c3c53b72b504868f5199998 /drivers/base/bus.c | |
parent | 93160c6397e460bc4c7ac15323fb698f91ef02e5 (diff) |
Driver core: coding style cleanup
This converts code of the form
if ((error = some_func()))
goto fixup;
to
error = some_func();
if (error)
goto fixup;
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 | } |