* [PATCH] acpi: Fix a broken kfree in i2c_ec
@ 2006-08-11 6:30 Jean Delvare
2006-08-11 15:55 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jean Delvare @ 2006-08-11 6:30 UTC (permalink / raw)
To: Greg KH; +Cc: LKML, Andrew Morton, Len Brown
Fix an obviously broken kfree() in acpi/i2c_ec device initialization
error path.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
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(-)
--- linux-2.6.18-rc3.orig/drivers/acpi/i2c_ec.c 2006-07-26 23:03:57.000000000 +0200
+++ linux-2.6.18-rc3/drivers/acpi/i2c_ec.c 2006-08-01 16:22:45.000000000 +0200
@@ -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;
}
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] acpi: Fix a broken kfree in i2c_ec
2006-08-11 6:30 [PATCH] acpi: Fix a broken kfree in i2c_ec Jean Delvare
@ 2006-08-11 15:55 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2006-08-11 15:55 UTC (permalink / raw)
To: Jean Delvare; +Cc: Greg KH, LKML, Andrew Morton
Applied.
thanks,
-Len
On Friday 11 August 2006 02:30, Jean Delvare wrote:
> Fix an obviously broken kfree() in acpi/i2c_ec device initialization
> error path.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> ---
> 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(-)
>
> --- linux-2.6.18-rc3.orig/drivers/acpi/i2c_ec.c 2006-07-26 23:03:57.000000000 +0200
> +++ linux-2.6.18-rc3/drivers/acpi/i2c_ec.c 2006-08-01 16:22:45.000000000 +0200
> @@ -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;
> }
>
>
> --
> Jean Delvare
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-11 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-11 6:30 [PATCH] acpi: Fix a broken kfree in i2c_ec Jean Delvare
2006-08-11 15:55 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox