* [PATCH] regulator: tps65090: Fix tps65090 crash on Tegra Dalmore
@ 2014-05-01 18:50 Doug Anderson
2014-05-01 18:59 ` Stephen Warren
0 siblings, 1 reply; 2+ messages in thread
From: Doug Anderson @ 2014-05-01 18:50 UTC (permalink / raw)
To: Lee Jones, Mark Brown
Cc: Stephen Warren, olof, Doug Anderson, lgirdwood, linux-kernel
The patch (60e91b5 regulator: tps65090: Allow setting the overcurrent
wait time) introduced a crash on Tegra Dalmore. On Dalmore the device
tree doesn't have an entry for all of the FETs so it leaves tps_pdata
NULL in some cases. Add a check for NULL like the rest of the code
does.
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
drivers/regulator/tps65090-regulator.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c
index ca04e9f..fbe0bf5 100644
--- a/drivers/regulator/tps65090-regulator.c
+++ b/drivers/regulator/tps65090-regulator.c
@@ -306,8 +306,11 @@ static int tps65090_regulator_probe(struct platform_device *pdev)
ri = &pmic[num];
ri->dev = &pdev->dev;
ri->desc = &tps65090_regulator_desc[num];
- ri->overcurrent_wait_valid = tps_pdata->overcurrent_wait_valid;
- ri->overcurrent_wait = tps_pdata->overcurrent_wait;
+ if (tps_pdata) {
+ ri->overcurrent_wait_valid =
+ tps_pdata->overcurrent_wait_valid;
+ ri->overcurrent_wait = tps_pdata->overcurrent_wait;
+ }
/*
* TPS5090 DCDC support the control from external digital input.
--
1.9.1.423.g4596e3a
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: tps65090: Fix tps65090 crash on Tegra Dalmore
2014-05-01 18:50 [PATCH] regulator: tps65090: Fix tps65090 crash on Tegra Dalmore Doug Anderson
@ 2014-05-01 18:59 ` Stephen Warren
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2014-05-01 18:59 UTC (permalink / raw)
To: Doug Anderson, Lee Jones, Mark Brown; +Cc: olof, lgirdwood, linux-kernel
On 05/01/2014 12:50 PM, Doug Anderson wrote:
> The patch (60e91b5 regulator: tps65090: Allow setting the overcurrent
> wait time) introduced a crash on Tegra Dalmore. On Dalmore the device
> tree doesn't have an entry for all of the FETs so it leaves tps_pdata
> NULL in some cases. Add a check for NULL like the rest of the code
> does.
Tested-by: Stephen Warren <swarren@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-01 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-01 18:50 [PATCH] regulator: tps65090: Fix tps65090 crash on Tegra Dalmore Doug Anderson
2014-05-01 18:59 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).