regulator: Use newly added devres_release() rather than open coding
PATCH 1/1 regulator: Use newly added devres_release() rather than open coding
devres_release() will call the destructor for the resource as well as freeing the devres data.
Signed-off-by Mark Brown <[email protected]>
--- drivers/regulator/core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/regulator/core.c +2 -5
@@ -1459,12 +1459,9 @@ void devm_regulator_put(struct regulator *regulator) {int rc; - rc =devres_destroy (regulator->dev, devm_regulator_release, + rc =devres_release (regulator->dev, devm_regulator_release, devm_regulator_match, regulator); -if (rc ==0 ) -regulator_put (regulator); -else -WARN_ON (rc); +WARN_ON (rc); }EXPORT_SYMBOL_GPL (devm_regulator_put);
Signature · 1 line
1.7.10