Skip to content

Commit

Permalink
regulator: tps65090: Fix tps65090 crash on Tegra Dalmore
Browse files Browse the repository at this point in the history
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.

Reported-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Doug Anderson authored and Mark Brown committed May 2, 2014
1 parent ed11f1e commit c122c5b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/regulator/tps65090-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,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.
Expand Down

0 comments on commit c122c5b

Please sign in to comment.