8 May 2012 19:16
[PATCH 2/2] regulator: core: Warn on missing struct device
Mark Brown <broonie <at> opensource.wolfsonmicro.com>
2012-05-08 17:16:20 GMT
2012-05-08 17:16:20 GMT
The core really wants a struct device to be supplied for regulators and there's no reason this should be impossible so provide one so complain if we didn't get one. Signed-off-by: Mark Brown <broonie <at> opensource.wolfsonmicro.com> --- drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c597868..f899af5 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c <at> <at> -2981,6 +2981,7 <at> <at> regulator_register(const struct regulator_desc *regulator_desc, return ERR_PTR(-EINVAL); dev = config->dev; + WARN_ON(!dev); if (regulator_desc->name == NULL || regulator_desc->ops == NULL) return ERR_PTR(-EINVAL); -- -- 1.7.10
RSS Feed