mirror of https://gitee.com/openkylin/linux.git
ACPI: fix kfree in i2c_ec error path
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
9f737633e6
commit
0ee6a17389
|
@ -330,7 +330,7 @@ static int acpi_ec_hc_add(struct acpi_device *device)
|
|||
status = acpi_evaluate_integer(ec_hc->handle, "_EC", NULL, &val);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error obtaining _EC\n"));
|
||||
kfree(ec_hc->smbus);
|
||||
kfree(ec_hc);
|
||||
kfree(smbus);
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue