forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
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);