From: Jean Delvare <khali@linux-fr.org>
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>, Len Brown <len.brown@intel.com>
Subject: [PATCH] acpi: Fix a broken kfree in i2c_ec
Date: Fri, 11 Aug 2006 08:30:31 +0200 [thread overview]
Message-ID: <20060811083031.69e20658.khali@linux-fr.org> (raw)
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
next reply other threads:[~2006-08-11 6:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-11 6:30 Jean Delvare [this message]
2006-08-11 15:55 ` [PATCH] acpi: Fix a broken kfree in i2c_ec Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060811083031.69e20658.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=akpm@osdl.org \
--cc=greg@kroah.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox