hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/stmpe.c
....@@ -1494,9 +1494,9 @@
14941494
14951495 int stmpe_remove(struct stmpe *stmpe)
14961496 {
1497
- if (!IS_ERR(stmpe->vio))
1497
+ if (!IS_ERR(stmpe->vio) && regulator_is_enabled(stmpe->vio))
14981498 regulator_disable(stmpe->vio);
1499
- if (!IS_ERR(stmpe->vcc))
1499
+ if (!IS_ERR(stmpe->vcc) && regulator_is_enabled(stmpe->vcc))
15001500 regulator_disable(stmpe->vcc);
15011501
15021502 __stmpe_disable(stmpe, STMPE_BLOCK_ADC);