diff options
author | Andi Kleen <andi@firstfloor.org> | 2010-07-21 00:18:36 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-08-15 06:53:08 +0200 |
commit | cfa806f059801dbe7e435745eb2e187c8bfe1e7f (patch) | |
tree | 9c99026f29b863ca0541699e45349b8fa40ea93a /drivers/acpi/osl.c | |
parent | ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS (diff) | |
download | linux-cfa806f059801dbe7e435745eb2e187c8bfe1e7f.tar.xz linux-cfa806f059801dbe7e435745eb2e187c8bfe1e7f.zip |
gcc-4.6: ACPI: fix unused but set variables in ACPI
Some minor improvements in error handling, but overall it was mostly dead
code.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 44bddc5bc6ad..03017b1eb38b 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -141,15 +141,14 @@ static struct osi_linux { static void __init acpi_request_region (struct acpi_generic_address *addr, unsigned int length, char *desc) { - struct resource *res; - if (!addr->address || !length) return; + /* Resources are never freed */ if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_IO) - res = request_region(addr->address, length, desc); + request_region(addr->address, length, desc); else if (addr->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) - res = request_mem_region(addr->address, length, desc); + request_mem_region(addr->address, length, desc); } static int __init acpi_reserve_resources(void) |