[3.13.y.z extended stable] Patch "hwmon: (emc1403) Fix resource leak on module unload" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Tue Jun 17 21:42:18 UTC 2014
This is a note to let you know that I have just added a patch titled
hwmon: (emc1403) Fix resource leak on module unload
to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue
This patch is scheduled to be released in version 3.13.11.4.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 1b8cef151d51a6b27d8b8ae479f17d71dc5a52e2 Mon Sep 17 00:00:00 2001
From: Jean Delvare <jdelvare at suse.de>
Date: Mon, 12 May 2014 11:44:51 +0200
Subject: hwmon: (emc1403) Fix resource leak on module unload
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 <jdelvare at suse.de>
Fixes: 454aee17f hwmon: (emc1403) Convert to use devm_hwmon_device_register_with_groups
Cc: Guenter Roeck <linux at roeck-us.net>
Signed-off-by: Guenter Roeck <linux at roeck-us.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/hwmon/emc1403.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
index 61d89d6..42a3cfc 100644
--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -355,9 +355,9 @@ static int emc1403_probe(struct i2c_client *client,
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);
--
1.9.1
More information about the kernel-team
mailing list