diff options
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e70dd382a009..046fb1bd8619 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1431,7 +1431,10 @@ void devm_regulator_put(struct regulator *regulator) | |||
1431 | 1431 | ||
1432 | rc = devres_destroy(regulator->dev, devm_regulator_release, | 1432 | rc = devres_destroy(regulator->dev, devm_regulator_release, |
1433 | devm_regulator_match, regulator); | 1433 | devm_regulator_match, regulator); |
1434 | WARN_ON(rc); | 1434 | if (rc == 0) |
1435 | regulator_put(regulator); | ||
1436 | else | ||
1437 | WARN_ON(rc); | ||
1435 | } | 1438 | } |
1436 | EXPORT_SYMBOL_GPL(devm_regulator_put); | 1439 | EXPORT_SYMBOL_GPL(devm_regulator_put); |
1437 | 1440 | ||