Skip to content
Commit ee78b936 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Pavel Machek
Browse files

leds: ktd2692: Fix an error handling path



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: b7da8c5c ("leds: Add ktd2692 flash LED driver")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 96a30960
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment