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

ACPI: Clean up error code path in acpi_unbind_one()

The error code path in acpi_unbind_one() is unnecessarily complicated
(in particular, the err label is not really necessary) and the error
message printed by it is inaccurate (there's nothing called
'acpi_handle' in that function), so clean up those things.
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: NToshi Kani <toshi.kani@hp.com>
Acked-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
上级 3e332783
...@@ -284,8 +284,10 @@ int acpi_unbind_one(struct device *dev) ...@@ -284,8 +284,10 @@ int acpi_unbind_one(struct device *dev)
return 0; return 0;
status = acpi_bus_get_device(ACPI_HANDLE(dev), &acpi_dev); status = acpi_bus_get_device(ACPI_HANDLE(dev), &acpi_dev);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status)) {
goto err; dev_err(dev, "Oops, ACPI handle corrupt in %s()\n", __func__);
return -EINVAL;
}
mutex_lock(&acpi_dev->physical_node_lock); mutex_lock(&acpi_dev->physical_node_lock);
...@@ -307,12 +309,7 @@ int acpi_unbind_one(struct device *dev) ...@@ -307,12 +309,7 @@ int acpi_unbind_one(struct device *dev)
} }
mutex_unlock(&acpi_dev->physical_node_lock); mutex_unlock(&acpi_dev->physical_node_lock);
return 0; return 0;
err:
dev_err(dev, "Oops, 'acpi_handle' corrupt\n");
return -EINVAL;
} }
EXPORT_SYMBOL_GPL(acpi_unbind_one); EXPORT_SYMBOL_GPL(acpi_unbind_one);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册