提交 9da64c25 编写于 作者: F Fabio Estevam 提交者: Jonathan Cameron

iio: adc: vf610: Disable the regulator on error

If clk_prepare_enable() fails we should disable the regulator that was
previously enabled.
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 2e3d6675
......@@ -704,11 +704,15 @@ static int vf610_adc_resume(struct device *dev)
ret = clk_prepare_enable(info->clk);
if (ret)
return ret;
goto disable_reg;
vf610_adc_hw_init(info);
return 0;
disable_reg:
regulator_disable(info->vref);
return ret;
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册