Colin Ian King 38d8ed6509 hwmon: (core) fix resource leak on devm_kcalloc failure
If dev_kcalloc fails to allocate hw_dev->groups then the current
exit path is a direct return, causing a leak of resources such
as hwdev and ida is not removed.  Fix this by exiting via the
free_hwmon exit path that performs the necessary resource cleanup.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2016-10-24 06:05:13 -07:00
..
2015-05-31 22:58:36 -07:00
2014-08-04 07:01:35 -07:00
2016-06-27 18:58:04 -07:00
2016-09-08 21:34:17 -07:00
2016-09-13 07:27:34 -07:00
2014-08-04 07:01:36 -07:00
2014-08-05 19:44:42 -07:00
2014-08-04 07:01:35 -07:00
2016-03-05 06:25:34 -08:00
2014-08-04 07:01:35 -07:00
2014-08-04 07:01:35 -07:00
2016-09-08 21:34:16 -07:00
2015-08-10 23:00:10 -07:00
2015-06-21 22:54:53 -07:00