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

    hwmon: (emc1403) Fix resource leak on module unload

to the 3.14-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-emc1403-fix-resource-leak-on-module-unload.patch
and it can be found in the queue-3.14 subdirectory.

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


>From 8759f9046550f463098148bf577ccd32cdb895e3 Mon Sep 17 00:00:00 2001
From: Jean Delvare <[email protected]>
Date: Mon, 12 May 2014 11:44:51 +0200
Subject: hwmon: (emc1403) Fix resource leak on module unload

From: Jean Delvare <[email protected]>

commit 8759f9046550f463098148bf577ccd32cdb895e3 upstream.

Commit 454aee17f claims to convert driver emc1403 to use
devm_hwmon_device_register_with_groups, however the patch itself makes
use of hwmon_device_register_with_groups instead. As the driver remove
function was still dropped, the hwmon device is no longer unregistered
on driver removal, leading to a resource leak.

Signed-off-by: Jean Delvare <[email protected]>
Fixes: 454aee17f hwmon: (emc1403) Convert to use 
devm_hwmon_device_register_with_groups
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/hwmon/emc1403.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -355,9 +355,9 @@ static int emc1403_probe(struct i2c_clie
        if (id->driver_data)
                data->groups[1] = &emc1404_group;
 
-       hwmon_dev = hwmon_device_register_with_groups(&client->dev,
-                                                     client->name, data,
-                                                     data->groups);
+       hwmon_dev = devm_hwmon_device_register_with_groups(&client->dev,
+                                                          client->name, data,
+                                                          data->groups);
        if (IS_ERR(hwmon_dev))
                return PTR_ERR(hwmon_dev);
 


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

queue-3.14/hwmon-emc1403-fix-inverted-store_hyst.patch
queue-3.14/hwmon-emc1403-fix-resource-leak-on-module-unload.patch
queue-3.14/revert-hwmon-coretemp-refine-tjmax-detection.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