diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-05 02:10:29 +0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-05 02:10:29 +0400 |
commit | f3fe8bd7b114d88c802616a98a0cf69299c37ed3 (patch) | |
tree | ae98aa0acb783c5f8e57bd29ca8ede44d569b444 /drivers/acpi/power.c | |
parent | c49d874bafd0a63379294ebd3531c41f9fcebc7d (diff) | |
parent | 4f5f64cf0cc916220aaa055992e31195470cfe37 (diff) | |
download | linux-f3fe8bd7b114d88c802616a98a0cf69299c37ed3.tar.xz |
Merge branch 'acpi-assorted'
* acpi-assorted:
ACPI / scan: Do not use dummy HID for system bus ACPI nodes
ACPI / power: Remove useless message from device registering routine
ACPI / glue: Update DBG macro to include KERN_DEBUG
ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
ACPI / memhotplug: remove redundant logic of acpi memory hotadd
ACPI / APEI: Fix the returned value in erst_dbg_read
Diffstat (limited to 'drivers/acpi/power.c')
-rw-r--r-- | drivers/acpi/power.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 7db61b8fa11f..6e7b9d523812 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -445,11 +445,8 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle) return -ENODEV; ret = acpi_bus_get_device(handle, &acpi_dev); - if (ret) - goto no_power_resource; - - if (!acpi_dev->power.flags.power_resources) - goto no_power_resource; + if (ret || !acpi_dev->power.flags.power_resources) + return -ENODEV; powered_device = kzalloc(sizeof(*powered_device), GFP_KERNEL); if (!powered_device) @@ -471,10 +468,6 @@ int acpi_power_resource_register_device(struct device *dev, acpi_handle handle) } return ret; - -no_power_resource: - printk(KERN_DEBUG PREFIX "Invalid Power Resource to register!\n"); - return -ENODEV; } EXPORT_SYMBOL_GPL(acpi_power_resource_register_device); |