Skip to content

Commit f2ae44a

Browse files
guohanjunrafaeljw
authored andcommitted
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: d445571 ("ACPI: fan: Optimize struct acpi_fan_fif") Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent eb70814 commit f2ae44a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/acpi/fan_core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ static int acpi_fan_get_fif(struct acpi_device *device)
236236
if (ACPI_FAILURE(status)) {
237237
dev_err(&device->dev, "Invalid _FIF element\n");
238238
status = -EINVAL;
239+
goto err;
239240
}
240241

241242
fan->fif.revision = fields[0];

0 commit comments

Comments
 (0)