diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-08 18:09:12 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-10 10:48:37 +0100 |
commit | dcf701125eefea6baf72753533cb8b60fb0e3934 (patch) | |
tree | af88fe1d27d9b9061a00a3a9064ac18d6389cb95 /drivers | |
parent | 0f82b6cf76516063fe26dac15e93544387c681eb (diff) | |
download | linux-dcf701125eefea6baf72753533cb8b60fb0e3934.tar.bz2 |
regulator: core: Warn on missing struct device
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@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9fafa00b8cd4..10fb252323fb 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2941,6 +2941,7 @@ 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); |