[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1339783430.26435.2.camel@joe2Laptop>
Date: Fri, 15 Jun 2012 11:03:50 -0700
From: Joe Perches <joe@...ches.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@...com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: Fix double free in devm_regulator_put()
On Fri, 2012-06-15 at 18:55 +0100, Mark Brown wrote:
> diff --git 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);
Seems an odd style choice. Perhaps:
rc = devres_release(regulator->dev, devm_regulator_release,
devm_regulator_match, regulator);
WARN_ON(rc);
--
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