commit | 770435e022b69e871738c147cc557bedd4edce4a | [log] [tgz] |
---|---|---|
author | Ben Hutchings <ben@decadent.org.uk> | Sat Mar 16 06:32:16 2013 -0700 |
committer | chrmhoffmann <chrmhoffmann@gmail.com> | Sun Apr 05 10:17:50 2020 +0200 |
tree | 30401cdacad40be407f7ef1b1948e250c743a778 | |
parent | d6b03be78674ad21b8fc4dc331a5330e2bb47261 [diff] |
hwmon: (sht15) Fix memory leak if regulator_enable() fails Commit 3e78080f8148 ('hwmon: (sht15) Check return value of regulator_enable()') depends on the use of devm_kmalloc() for automatic resource cleanup in the failure cases, which was introduced in 3.7. In older stable branches, explicit cleanup is needed. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>