summaryrefslogtreecommitdiff
path: root/drivers/base/bus.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2007-07-09 11:39:18 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 16:09:02 -0700
commitdc0afa8388972a9ed7c2203cc46d8df1a4713f65 (patch)
treea4693ef5ac039e868c3c53b72b504868f5199998 /drivers/base/bus.c
parent93160c6397e460bc4c7ac15323fb698f91ef02e5 (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.c6
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)
if (error)
goto out_put_bus;
drv->kobj.kset = &bus->drivers;
- if ((error = kobject_register(&drv->kobj)))
+ error = kobject_register(&drv->kobj);
+ if (error)
goto out_put_bus;
if (drv->bus->drivers_autoprobe) {
@@ -772,7 +773,8 @@ static int bus_add_attrs(struct bus_type * bus)
if (bus->bus_attrs) {
for (i = 0; attr_name(bus->bus_attrs[i]); i++) {
- if ((error = bus_create_file(bus,&bus->bus_attrs[i])))
+ error = bus_create_file(bus,&bus->bus_attrs[i]);
+ if (error)
goto Err;
}
}