diff options
| author | Fabio Estevam <[email protected]> | 2016-07-09 21:57:42 +0000 |
|---|---|---|
| committer | Philipp Zabel <[email protected]> | 2016-07-12 16:24:30 +0000 |
| commit | deb65870b5d9d939bb319661dd489272a6de665d (patch) | |
| tree | 5bc0a75230cce19cd5073ea2e82cadbc6c0c8123 /drivers/gpu/drm/imx/imx-tve.c | |
| parent | drm/imx: imx-ldb: check return code on panel attach (diff) | |
| download | kernel-deb65870b5d9d939bb319661dd489272a6de665d.tar.gz kernel-deb65870b5d9d939bb319661dd489272a6de665d.zip | |
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: Fabio Estevam <[email protected]>
Signed-off-by: Philipp Zabel <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-tve.c')
| -rw-r--r-- | drivers/gpu/drm/imx/imx-tve.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c index a293a7dad0d9..fe36309e18c1 100644 --- a/drivers/gpu/drm/imx/imx-tve.c +++ b/drivers/gpu/drm/imx/imx-tve.c @@ -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"); 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); if (ret) return ret; |
