]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
thermal: intel: int340x: Remove redundant acpi_has_method() call
authorSalah Triki <salah.triki@gmail.com>
Fri, 25 Jul 2025 05:07:01 +0000 (06:07 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 19 Aug 2025 19:18:29 +0000 (21:18 +0200)
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 <salah.triki@gmail.com>
Link: https://patch.msgid.link/aIMQ9RFciI8jmmAh@pc
[ rjw: Subject adjustment ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c

index cb149bcdd7d5d3eb25458b657e2612ceea14a1e9..ce5d53be108b45f0a5d4e1892b2b06b1c6768bb1 100644 (file)
@@ -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;