diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-11-21 23:33:55 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-11-23 21:13:34 +0100 |
commit | 64e94aafb6a5c4f419e9b8f93950914b5ac162a9 (patch) | |
tree | afecaed56199e369ec627e75813ccb7012dccbfd | |
parent | d74e278aaf3b0fe4b02af67055aa71babcc0cebe (diff) | |
download | blackbird-op-linux-64e94aafb6a5c4f419e9b8f93950914b5ac162a9.tar.gz blackbird-op-linux-64e94aafb6a5c4f419e9b8f93950914b5ac162a9.zip |
PM / Sleep: Simplify device_suspend_noirq()
Remove a few if () and return statements in device_suspend_noirq()
that aren't really necessary.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
-rw-r--r-- | drivers/base/power/main.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 1172aeaf7ecf..406f82c344fa 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -763,31 +763,23 @@ static pm_message_t resume_event(pm_message_t sleep_state) */ static int device_suspend_noirq(struct device *dev, pm_message_t state) { - int error; + int error = 0; if (dev->pm_domain) { pm_dev_dbg(dev, state, "LATE power domain "); error = pm_noirq_op(dev, &dev->pm_domain->ops, state); - if (error) - return error; } else if (dev->type && dev->type->pm) { pm_dev_dbg(dev, state, "LATE type "); error = pm_noirq_op(dev, dev->type->pm, state); - if (error) - return error; } else if (dev->class && dev->class->pm) { pm_dev_dbg(dev, state, "LATE class "); error = pm_noirq_op(dev, dev->class->pm, state); - if (error) - return error; } else if (dev->bus && dev->bus->pm) { pm_dev_dbg(dev, state, "LATE "); error = pm_noirq_op(dev, dev->bus->pm, state); - if (error) - return error; } - return 0; + return error; } /** |