[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1339782943-16652-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Fri, 15 Jun 2012 18:55:43 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Liam Girdwood <lrg@...com>
Cc: linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH] regulator: Fix double free in devm_regulator_put()
Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---
drivers/regulator/core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 63507a5..a2c5cfb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1461,9 +1461,7 @@ void devm_regulator_put(struct regulator *regulator)
rc = devres_release(regulator->dev, devm_regulator_release,
devm_regulator_match, regulator);
- if (rc == 0)
- regulator_put(regulator);
- else
+ if (rc != 0)
WARN_ON(rc);
}
EXPORT_SYMBOL_GPL(devm_regulator_put);
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists