mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
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: d445571fa3
("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>
This commit is contained in:
parent
eb7081409f
commit
f2ae44ae53
1 changed files with 1 additions and 0 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue