Skip to contentSkip to conversation

backlight: lp855x: disable enable regulator when remove

PATCH New Chuhong Yuan 1 participant 1 message Nov 1, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: lp855x: disable enable regulator when remove

lp855x forgets to disable enable regulator when remove. Add a call to regulator_disable in remove just like what is done to supply regulator.

---
 drivers/video/backlight/lp855x_bl.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/video/backlight/lp855x_bl.c +2 -0
index f68920131a4a..4fcf9ec18868 100644
@@ -499,6 +499,8 @@ static int lp855x_remove(struct i2c_client *cl)
 	backlight_update_status(lp->bl);
 	if (lp->supply)
 		regulator_disable(lp->supply);
+	if (lp->enable)
+		regulator_disable(lp->enable);
 	sysfs_remove_group(&lp->dev->kobj, &lp855x_attr_group);
 
 	return 0;
Signature · 1 line
2.23.0