This is a note to let you know that I've just added the patch titled
hwmon: (sht15) Fix memory leak if regulator_enable() fails
to the 3.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch
and it can be found in the queue-3.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From [email protected] Mon Mar 18 12:40:31 2013
From: Guenter Roeck <[email protected]>
Date: Sat, 16 Mar 2013 06:32:16 -0700
Subject: hwmon: (sht15) Fix memory leak if regulator_enable() fails
To: [email protected]
Cc: Ben Hutchings <[email protected]>, Guenter Roeck <[email protected]>
Message-ID: <[email protected]>
From: Ben Hutchings <[email protected]>
Commit 3e78080f8148 ('hwmon: (sht15) Check return value of
regulator_enable()') depends on the use of devm_kmalloc() for automatic
resource cleanup in the failure cases, which was introduced in 3.7. In
older stable branches, explicit cleanup is needed.
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
Applies to stable branches between 3.0 and 3.6 where commit 3e78080f8148
has been applied.
drivers/hwmon/sht15.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -930,7 +930,7 @@ static int __devinit sht15_probe(struct
if (ret != 0) {
dev_err(&pdev->dev,
"failed to enable regulator: %d\n", ret);
- return ret;
+ goto err_free_data;
}
/*
Patches currently in stable-queue which might be from [email protected] are
queue-3.4/hwmon-pmbus-ltc2978-fix-temperature-reporting.patch
queue-3.4/hwmon-sht15-fix-memory-leak-if-regulator_enable-fails.patch
queue-3.4/hwmon-lineage-pem-add-missing-terminating-entry-for-pem__attributes.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html