forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
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);