hwmon: (iio_hwmon) fix memory leak in name attribute
authorQuentin Schulz <quentin.schulz@free-electrons.com>
Tue, 26 Jul 2016 07:47:09 +0000 (09:47 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 31 Jul 2016 22:02:52 +0000 (15:02 -0700)
commit5d17d3b4bbf3becb89fd48b74340a50a39736f6d
tree879614286b3ba1b112f2bd246ab79d0ade44fc28
parent4c8702b3cd43322ca97fdc7f647e273a7388a0c6
hwmon: (iio_hwmon) fix memory leak in name attribute

The "name" variable's memory is now freed when the device is destructed
thanks to devm function.

Signed-off-by: Quentin Schulz <quentin.schulz@free-electrons.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: e0f8a24e0edfd ("staging:iio::hwmon interface client driver.")
Fixes: 61bb53bcbdd86 ("hwmon: (iio_hwmon) Add support for humidity sensors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/iio_hwmon.c