|
@@ -421,9 +421,11 @@ static int acpi_memory_device_add(struct acpi_device *device)
|
|
if (!acpi_memory_check_device(mem_device)) {
|
|
if (!acpi_memory_check_device(mem_device)) {
|
|
/* call add_memory func */
|
|
/* call add_memory func */
|
|
result = acpi_memory_enable_device(mem_device);
|
|
result = acpi_memory_enable_device(mem_device);
|
|
- if (result)
|
|
|
|
|
|
+ if (result) {
|
|
printk(KERN_ERR PREFIX
|
|
printk(KERN_ERR PREFIX
|
|
"Error in acpi_memory_enable_device\n");
|
|
"Error in acpi_memory_enable_device\n");
|
|
|
|
+ acpi_memory_device_free(mem_device);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|