aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/processor_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/processor_driver.c')
-rw-r--r--drivers/acpi/processor_driver.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 50be27739fe8..41de1355edcd 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -536,8 +536,8 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
536 return -ENOMEM; 536 return -ENOMEM;
537 537
538 if (!zalloc_cpumask_var(&pr->throttling.shared_cpu_map, GFP_KERNEL)) { 538 if (!zalloc_cpumask_var(&pr->throttling.shared_cpu_map, GFP_KERNEL)) {
539 kfree(pr); 539 result = -ENOMEM;
540 return -ENOMEM; 540 goto err_free_pr;
541 } 541 }
542 542
543 pr->handle = device->handle; 543 pr->handle = device->handle;
@@ -577,7 +577,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
577 dev = get_cpu_device(pr->id); 577 dev = get_cpu_device(pr->id);
578 if (sysfs_create_link(&device->dev.kobj, &dev->kobj, "sysdev")) { 578 if (sysfs_create_link(&device->dev.kobj, &dev->kobj, "sysdev")) {
579 result = -EFAULT; 579 result = -EFAULT;
580 goto err_free_cpumask; 580 goto err_clear_processor;
581 } 581 }
582 582
583 /* 583 /*
@@ -595,9 +595,15 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)
595 595
596err_remove_sysfs: 596err_remove_sysfs:
597 sysfs_remove_link(&device->dev.kobj, "sysdev"); 597 sysfs_remove_link(&device->dev.kobj, "sysdev");
598err_clear_processor:
599 /*
600 * processor_device_array is not cleared to allow checks for buggy BIOS
601 */
602 per_cpu(processors, pr->id) = NULL;
598err_free_cpumask: 603err_free_cpumask:
599 free_cpumask_var(pr->throttling.shared_cpu_map); 604 free_cpumask_var(pr->throttling.shared_cpu_map);
600 605err_free_pr:
606 kfree(pr);
601 return result; 607 return result;
602} 608}
603 609