acpi: Fix a broken kfree in i2c_ec
PATCH 1/1 acpi: Fix a broken kfree in i2c_ec
Fix an obviously broken kfree() in acpi/i2c_ec device initialization error path.
Signed-off-by Jean Delvare <[email protected]>
---
This function would benefit from some improvements (single error path, kzalloc) but let's fix that obvious bug first. This would preferably go to Linus before 2.6.18.
drivers/acpi/i2c_ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/i2c_ec.c +1 -1
@@ -330,7 +330,7 @@ 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 ; }
Signature · 1 line
Jean Delvare
Len Brown
AppliedApplied.
thanks,
-Len
Quoted 33 lines · Jean Delvare
Fix an obviously broken
kfree()in acpi/i2c_ec device initialization error path.Signed-off-by Jean Delvare <[email protected]>---
This function would benefit from some improvements (single error path, kzalloc) but let's fix that obvious bug first. This would preferably go to Linus before 2.6.18.drivers/acpi/i2c_ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/acpi/i2c_ec.c +1
-1@@ -330,7 +330,7 @@ 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 ; }Signature · 7 lines
-- Jean Delvare - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/