提交 c122c5b6 编写于 作者: D Doug Anderson 提交者: Mark Brown

regulator: tps65090: Fix tps65090 crash on Tegra Dalmore

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: NOlof Johansson <olof@lixom.net>
Signed-off-by: NDoug Anderson <dianders@chromium.org>
Tested-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 ed11f1ea
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册