hwmon: (emc1403) Fix resource leak on module unload
authorJean Delvare <jdelvare@suse.de>
Mon, 12 May 2014 09:44:51 +0000 (11:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:11 +0000 (10:28 -0700)
commit5b532284ae769ee07b5f9592b1888da9336fca18
tree68f557664cb8435777a9e2c0457a47ef4e3ec198
parent0b86a50c92e0118117224d57a9b4aa79d33d98b0
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@suse.de>
Fixes: 454aee17f hwmon: (emc1403) Convert to use devm_hwmon_device_register_with_groups
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/emc1403.c