[PATCH] ACPI: fan: Bail out if extract package failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/acpi/fan_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/acpi/fan_core.c b/drivers/acpi/fan_core.c
index 52a0b30..9dccbae 100644
--- a/drivers/acpi/fan_core.c
+++ b/drivers/acpi/fan_core.c
@@ -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];
-- 
1.7.12.4




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux