Skip to contentSkip to conversation

ACPI / PMIC: intel: Drop double removal of address space handler

PATCH Applied Andy Shevchenko 3 participants 3 messages Jul 3, 2019 – Jul 5, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / PMIC: intel: Drop double removal of address space handler

There is no need to remove address space handler twice, because removal is idempotent.

---
 drivers/acpi/pmic/intel_pmic.c | 2 --
 1 file changed, 2 deletions(-)
drivers/acpi/pmic/intel_pmic.c +0 -2
index 1b722fd57d5e..452041398b34 100644
@@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
 						    intel_pmic_thermal_handler,
 						    NULL, opregion);
 	if (ACPI_FAILURE(status)) {
-		acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID,
-						  intel_pmic_power_handler);
 		ret = -ENODEV;
 		goto out_remove_power_handler;
 	}
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines · Andy Shevchenko

There is no need to remove address space handler twice, because removal is idempotent.

Good catch:

Regards,

Hans

Quoted 18 lines
---
  drivers/acpi/pmic/intel_pmic.c | 2 --
  1 file changed, 2 deletions(-)
drivers/acpi/pmic/intel_pmic.c +0 -2
index 1b722fd57d5e..452041398b34 100644
@@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
  						    intel_pmic_thermal_handler,
  						    NULL, opregion);
  	if (ACPI_FAILURE(status)) {
-		acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID,
-						  intel_pmic_power_handler);
  		ret = -ENODEV;
  		goto out_remove_power_handler;
  	}
#2 lore raw
In reply to Andy Shevchenko
Quoted 14 lines · CEST Andy Shevchenko

There is no need to remove address space handler twice, because removal is idempotent.

---
 drivers/acpi/pmic/intel_pmic.c | 2 --
 1 file changed, 2 deletions(-)
drivers/acpi/pmic/intel_pmic.c +0 -0
index 1b722fd57d5e..452041398b34 100644

drivers/acpi/pmic/intel_pmic.c int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle, · line 289

Quoted 8 lines
drivers/acpi/pmic/intel_pmic.c +0 -2
@@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
 						    intel_pmic_thermal_handler,
 						    NULL, opregion);
 	if (ACPI_FAILURE(status)) {
-		acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID,
-						  intel_pmic_power_handler);
 		ret = -ENODEV;
 		goto out_remove_power_handler;
 	}

Applied, thanks!