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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
93160c6397
commit
dc0afa8388
@@ -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);
|
||||
|
Reference in New Issue
Block a user