Commit deb65870 authored by Fabio Estevam's avatar Fabio Estevam Committed by Philipp Zabel

drm/imx: imx-tve: check the value returned by regulator_set_voltage()

regulator_set_voltage() may fail, so we better check its return value
and propagate it in the case of error.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 7075ba79
...@@ -628,7 +628,9 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data) ...@@ -628,7 +628,9 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
tve->dac_reg = devm_regulator_get(dev, "dac"); tve->dac_reg = devm_regulator_get(dev, "dac");
if (!IS_ERR(tve->dac_reg)) { if (!IS_ERR(tve->dac_reg)) {
regulator_set_voltage(tve->dac_reg, 2750000, 2750000); ret = regulator_set_voltage(tve->dac_reg, 2750000, 2750000);
if (ret)
return ret;
ret = regulator_enable(tve->dac_reg); ret = regulator_enable(tve->dac_reg);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment