kernel/drivers/mfd/stmpe.c
.. .. @@ -1494,9 +1494,9 @@ 1494 1494 1495 1495 int stmpe_remove(struct stmpe *stmpe) 1496 1496 { 1497 - if (!IS_ERR(stmpe->vio))1497 + if (!IS_ERR(stmpe->vio) && regulator_is_enabled(stmpe->vio))1498 1498 regulator_disable(stmpe->vio); 1499 - if (!IS_ERR(stmpe->vcc))1499 + if (!IS_ERR(stmpe->vcc) && regulator_is_enabled(stmpe->vcc))1500 1500 regulator_disable(stmpe->vcc); 1501 1501 1502 1502 __stmpe_disable(stmpe, STMPE_BLOCK_ADC);