Christophe JAILLET
09f064fcad
leds: ktd2692: Fix an error handling path
...
[ Upstream commit ee78b9360e ]
In 'ktd2692_parse_dt()', if an error occurs after a successful
'regulator_enable()' call, we should call 'regulator_enable()'.
This is the same in 'ktd2692_probe()', if an error occurs after a
successful 'ktd2692_parse_dt()' call.
Instead of adding 'regulator_enable()' in several places, implement a
resource managed solution and simplify the remove function accordingly.
Fixes: b7da8c5c72 ("leds: Add ktd2692 flash LED driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Pavel Machek <pavel@ucw.cz >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-07-20 16:15:57 +02:00
..
2019-12-17 20:35:54 +01:00
2018-06-28 21:34:43 +02:00
2016-01-04 09:57:37 +01:00
2020-08-19 08:14:56 +02:00
2018-01-07 13:27:07 +01:00
2021-02-03 23:23:25 +01:00
2020-08-11 15:32:32 +02:00
2017-09-07 14:33:13 -07:00
2018-06-12 16:19:22 -07:00
2018-06-28 21:34:43 +02:00
2021-07-20 16:15:57 +02:00
2014-10-20 16:20:43 +02:00
2020-11-05 11:08:46 +01:00
2020-11-05 11:08:46 +01:00
2016-01-04 09:57:32 +01:00
2018-01-08 21:28:10 +01:00
2017-09-14 11:59:30 +02:00
2015-11-03 08:59:09 +01:00
2016-11-23 16:38:01 +01:00
2017-03-29 21:02:27 +02:00
2018-06-12 16:19:22 -07:00
2020-08-11 15:32:32 +02:00
2018-06-12 16:19:22 -07:00
2016-01-04 09:57:34 +01:00
2015-08-28 14:06:23 +02:00
2014-09-29 10:21:01 -07:00
2017-08-29 21:10:40 +02:00
2016-06-20 09:57:56 +02:00
2016-01-04 09:57:38 +01:00
2017-08-12 23:50:07 +02:00
2016-08-15 14:02:31 +02:00
2021-07-20 16:15:57 +02:00
2020-08-19 08:14:54 +02:00
2015-08-28 14:06:02 +02:00
2020-08-11 15:32:32 +02:00
2018-05-23 21:44:47 +02:00
2016-01-04 09:57:32 +01:00
2020-01-04 19:12:43 +01:00
2015-11-03 08:59:50 +01:00
2019-04-05 22:33:07 +02:00
2016-01-04 09:57:33 +01:00
2016-03-14 09:22:20 +01:00
2017-03-23 20:33:59 +01:00
2018-06-12 16:19:22 -07:00
2021-05-26 11:48:35 +02:00
2019-10-05 13:09:34 +02:00
2018-06-12 16:19:22 -07:00
2016-03-14 09:22:22 +01:00
2018-01-08 21:28:12 +01:00
2018-07-03 22:12:41 +02:00
2018-07-03 22:12:41 +02:00
2017-08-26 20:26:35 -04:00
2018-06-12 16:19:22 -07:00
2015-11-03 08:59:52 +01:00
2018-06-12 16:19:22 -07:00
2020-10-01 13:14:25 +02:00
2017-03-23 20:23:57 +01:00
2015-11-03 08:59:54 +01:00
2018-06-12 16:19:22 -07:00
2016-11-22 12:07:04 +01:00
2018-08-06 23:03:12 +02:00
2015-11-03 08:59:13 +01:00
2018-06-12 16:19:22 -07:00
2020-02-24 08:34:35 +01:00
2019-05-04 09:20:22 +02:00
2017-12-01 08:57:42 +00:00
2017-08-29 21:10:39 +02:00
2019-01-13 09:51:08 +01:00
2014-10-20 16:20:43 +02:00
2016-01-04 09:57:35 +01:00
2016-03-14 09:22:22 +01:00
2018-05-22 21:57:59 +02:00
2017-09-14 11:59:30 +02:00
2016-01-04 09:57:38 +01:00
2016-01-04 09:57:39 +01:00
2018-06-12 16:19:22 -07:00
2017-07-16 18:45:43 +02:00
2020-08-11 15:32:32 +02:00
2016-01-04 09:57:35 +01:00
2015-11-03 08:59:58 +01:00
2016-05-06 10:22:09 +02:00
2018-05-23 21:44:47 +02:00
2018-02-11 14:34:03 -08:00