提交 d74e278a 编写于 作者: R Rafael J. Wysocki

PM / Sleep: Remove unnecessary label and jumps to it form PM core code

The "End" label in device_prepare() in drivers/base/power/main.c is
not necessary and the jumps to it have no real effect, so remove them
all.
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: NSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
上级 6a76b7a9
...@@ -1033,22 +1033,16 @@ static int device_prepare(struct device *dev, pm_message_t state) ...@@ -1033,22 +1033,16 @@ static int device_prepare(struct device *dev, pm_message_t state)
if (dev->pm_domain->ops.prepare) if (dev->pm_domain->ops.prepare)
error = dev->pm_domain->ops.prepare(dev); error = dev->pm_domain->ops.prepare(dev);
suspend_report_result(dev->pm_domain->ops.prepare, error); suspend_report_result(dev->pm_domain->ops.prepare, error);
if (error)
goto End;
} else if (dev->type && dev->type->pm) { } else if (dev->type && dev->type->pm) {
pm_dev_dbg(dev, state, "preparing type "); pm_dev_dbg(dev, state, "preparing type ");
if (dev->type->pm->prepare) if (dev->type->pm->prepare)
error = dev->type->pm->prepare(dev); error = dev->type->pm->prepare(dev);
suspend_report_result(dev->type->pm->prepare, error); suspend_report_result(dev->type->pm->prepare, error);
if (error)
goto End;
} else if (dev->class && dev->class->pm) { } else if (dev->class && dev->class->pm) {
pm_dev_dbg(dev, state, "preparing class "); pm_dev_dbg(dev, state, "preparing class ");
if (dev->class->pm->prepare) if (dev->class->pm->prepare)
error = dev->class->pm->prepare(dev); error = dev->class->pm->prepare(dev);
suspend_report_result(dev->class->pm->prepare, error); suspend_report_result(dev->class->pm->prepare, error);
if (error)
goto End;
} else if (dev->bus && dev->bus->pm) { } else if (dev->bus && dev->bus->pm) {
pm_dev_dbg(dev, state, "preparing "); pm_dev_dbg(dev, state, "preparing ");
if (dev->bus->pm->prepare) if (dev->bus->pm->prepare)
...@@ -1056,7 +1050,6 @@ static int device_prepare(struct device *dev, pm_message_t state) ...@@ -1056,7 +1050,6 @@ static int device_prepare(struct device *dev, pm_message_t state)
suspend_report_result(dev->bus->pm->prepare, error); suspend_report_result(dev->bus->pm->prepare, error);
} }
End:
device_unlock(dev); device_unlock(dev);
return error; return error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册