aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.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/core.c
parent93160c6397e460bc4c7ac15323fb698f91ef02e5 (diff)
downloadkernel_samsung_aries-dc0afa8388972a9ed7c2203cc46d8df1a4713f65.zip
kernel_samsung_aries-dc0afa8388972a9ed7c2203cc46d8df1a4713f65.tar.gz
kernel_samsung_aries-dc0afa8388972a9ed7c2203cc46d8df1a4713f65.tar.bz2
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/core.c')
-rw-r--r--drivers/base/core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index dd40d78..cff4fbf 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -733,11 +733,14 @@ int device_add(struct device *dev)
}
}
- if ((error = device_add_attrs(dev)))
+ error = device_add_attrs(dev);
+ if (error)
goto AttrsError;
- if ((error = device_pm_add(dev)))
+ error = device_pm_add(dev);
+ if (error)
goto PMError;
- if ((error = bus_add_device(dev)))
+ error = bus_add_device(dev);
+ if (error)
goto BusError;
kobject_uevent(&dev->kobj, KOBJ_ADD);
bus_attach_device(dev);