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/core.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/core.c')
-rw-r--r-- | drivers/base/core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index dd40d78a023d..cff4fbfbb055 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -733,11 +733,14 @@ int device_add(struct device *dev) | |||
733 | } | 733 | } |
734 | } | 734 | } |
735 | 735 | ||
736 | if ((error = device_add_attrs(dev))) | 736 | error = device_add_attrs(dev); |
737 | if (error) | ||
737 | goto AttrsError; | 738 | goto AttrsError; |
738 | if ((error = device_pm_add(dev))) | 739 | error = device_pm_add(dev); |
740 | if (error) | ||
739 | goto PMError; | 741 | goto PMError; |
740 | if ((error = bus_add_device(dev))) | 742 | error = bus_add_device(dev); |
743 | if (error) | ||
741 | goto BusError; | 744 | goto BusError; |
742 | kobject_uevent(&dev->kobj, KOBJ_ADD); | 745 | kobject_uevent(&dev->kobj, KOBJ_ADD); |
743 | bus_attach_device(dev); | 746 | bus_attach_device(dev); |