* [PATCH] regulator: wm831x-dcdc: Add missing checks for pdata before use
@ 2012-05-14 10:40 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-05-14 10:40 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/wm831x-dcdc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index d685911..099da11 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -518,7 +518,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
}
dcdc->dvs_vsel = ret & WM831X_DC1_DVS_VSEL_MASK;
- if (pdata->dcdc[id])
+ if (pdata && pdata->dcdc[id])
wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data);
config.dev = pdev->dev.parent;
@@ -851,7 +851,8 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev)
dcdc->desc.enable_mask = 1 << id;
config.dev = pdev->dev.parent;
- config.init_data = pdata->dcdc[id];
+ if (pdata)
+ config.init_data = pdata->dcdc[id];
config.driver_data = dcdc;
config.regmap = wm831x->regmap;
--
1.7.10
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-14 10:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14 10:40 [PATCH] regulator: wm831x-dcdc: Add missing checks for pdata before use Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®