From: Salah Triki Date: Fri, 25 Jul 2025 05:07:01 +0000 (+0100) Subject: thermal: intel: int340x: Remove redundant acpi_has_method() call X-Git-Tag: v6.18-rc1~150^2~3^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3d9ab61f53cdf72fed737c66652a8aad9d27504c;p=thirdparty%2Flinux.git thermal: intel: int340x: Remove redundant acpi_has_method() call acpi_evaluate_object() returns an error if the needed method does not exist, so remove an unnecessary acpi_has_method() call preceding it. Signed-off-by: Salah Triki Link: https://patch.msgid.link/aIMQ9RFciI8jmmAh@pc [ rjw: Subject adjustment ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c index cb149bcdd7d5d..ce5d53be108b4 100644 --- a/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c +++ b/drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c @@ -220,9 +220,6 @@ static int acpi_parse_psvt(acpi_handle handle, int *psvt_count, struct psvt **ps int i, result = 0; struct psvt *psvts; - if (!acpi_has_method(handle, "PSVT")) - return -ENODEV; - status = acpi_evaluate_object(handle, "PSVT", NULL, &buffer); if (ACPI_FAILURE(status)) return -ENODEV;