Pi-Hsun Shih 176cf70442
regulator: cros-ec-regulator: Fix double free of desc->name.
The desc->name field is allocated with devm_kstrdup, but is also kfreed
on the error path, causing it to be double freed. Remove the kfree on
the error path.

Fixes: 8d9f8d57e023 ("regulator: Add driver for cros-ec-regulator")
Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200728091909.2009771-1-pihsun@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-28 16:53:14 +01:00
..
2020-05-08 18:18:13 +01:00
2020-05-08 18:18:13 +01:00
2020-06-15 23:06:30 +01:00
2020-07-15 15:47:16 +01:00
2020-07-15 15:47:16 +01:00
2019-06-18 19:12:47 +01:00
2020-05-08 18:18:13 +01:00
2020-07-02 16:45:46 +01:00
2020-05-08 18:18:13 +01:00
2019-12-17 13:08:41 -08:00
2020-05-08 18:18:13 +01:00