Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: fan: Bail out if extract package failed

Bail out if we extract the _FIF package failed, or we will end
of referencing the garbage information in fields[], the fan control
will be in mess, fix it.

Fiexes: d445571fa369 ("ACPI: fan: Optimize struct acpi_fan_fif")
Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Hanjun Guo and committed by
Rafael J. Wysocki
f2ae44ae eb708140

+1
+1
drivers/acpi/fan_core.c
··· 236 236 if (ACPI_FAILURE(status)) { 237 237 dev_err(&device->dev, "Invalid _FIF element\n"); 238 238 status = -EINVAL; 239 + goto err; 239 240 } 240 241 241 242 fan->fif.revision = fields[0];