summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/glue.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-07 01:22:51 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-07 23:41:48 +0200
commit38e88839eff8a3d2e8d3bcc2ad833fe51cca0496 (patch)
treed23e77a0a1d12a5d7367f7770591a472c26ed5a8 /drivers/acpi/glue.c
parent3e3327837c180781960188563b4e4d5c004c2b29 (diff)
downloadlinux-38e88839eff8a3d2e8d3bcc2ad833fe51cca0496.tar.bz2
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: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com> Acked-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r--drivers/acpi/glue.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 570628e1def3..dcba319ac3f1 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -284,8 +284,10 @@ int acpi_unbind_one(struct device *dev)
return 0;
status = acpi_bus_get_device(ACPI_HANDLE(dev), &acpi_dev);
- if (ACPI_FAILURE(status))
- goto err;
+ if (ACPI_FAILURE(status)) {
+ dev_err(dev, "Oops, ACPI handle corrupt in %s()\n", __func__);
+ return -EINVAL;
+ }
mutex_lock(&acpi_dev->physical_node_lock);
@@ -307,12 +309,7 @@ int acpi_unbind_one(struct device *dev)
}
mutex_unlock(&acpi_dev->physical_node_lock);
-
return 0;
-
-err:
- dev_err(dev, "Oops, 'acpi_handle' corrupt\n");
- return -EINVAL;
}
EXPORT_SYMBOL_GPL(acpi_unbind_one);