Commit f2ae44ae authored by Hanjun Guo's avatar Hanjun Guo Committed by Rafael J. Wysocki

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: d445571f ("ACPI: fan: Optimize struct acpi_fan_fif")
Signed-off-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent eb708140
......@@ -236,6 +236,7 @@ static int acpi_fan_get_fif(struct acpi_device *device)
if (ACPI_FAILURE(status)) {
dev_err(&device->dev, "Invalid _FIF element\n");
status = -EINVAL;
goto err;
}
fan->fif.revision = fields[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment