This is a note to let you know that I've just added the patch titled

    hwmon: (ads1015) Fix file leak in probe function

to the 3.2-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-ads1015-fix-file-leak-in-probe-function.patch
and it can be found in the queue-3.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 363434b5dc352464ac7601547891e5fc9105f124 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <[email protected]>
Date: Wed, 22 Feb 2012 08:13:52 -0800
Subject: hwmon: (ads1015) Fix file leak in probe function

From: Guenter Roeck <[email protected]>

commit 363434b5dc352464ac7601547891e5fc9105f124 upstream.

An error while creating sysfs attribute files in the driver's probe function
results in an error abort, but already created files are not removed. This patch
fixes the problem.

Signed-off-by: Guenter Roeck <[email protected]>
Cc: Dirk Eibach <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/hwmon/ads1015.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/hwmon/ads1015.c
+++ b/drivers/hwmon/ads1015.c
@@ -271,7 +271,7 @@ static int ads1015_probe(struct i2c_clie
                        continue;
                err = device_create_file(&client->dev, &ads1015_in[k].dev_attr);
                if (err)
-                       goto exit_free;
+                       goto exit_remove;
        }
 
        data->hwmon_dev = hwmon_device_register(&client->dev);
@@ -285,7 +285,6 @@ static int ads1015_probe(struct i2c_clie
 exit_remove:
        for (k = 0; k < ADS1015_CHANNELS; ++k)
                device_remove_file(&client->dev, &ads1015_in[k].dev_attr);
-exit_free:
        kfree(data);
 exit:
        return err;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.2/hwmon-ads1015-fix-file-leak-in-probe-function.patch
queue-3.2/hwmon-max6639-fix-fan_from_reg-calculation.patch
queue-3.2/hwmon-max6639-fix-ppr-register-initialization-to-set-both-channels.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

Reply via email to