Commit 925b3836 authored by Anson Huang's avatar Anson Huang Committed by Eduardo Valentin

thermal: imx: save one condition block for normal case of nvmem initialization

Put return value checks of calling imx_init_from_nvmem_cells()
into one block to save one condition block for normal case.
Signed-off-by: default avatarAnson Huang <Anson.Huang@nxp.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent c589c566
...@@ -742,9 +742,10 @@ static int imx_thermal_probe(struct platform_device *pdev) ...@@ -742,9 +742,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
if (of_find_property(pdev->dev.of_node, "nvmem-cells", NULL)) { if (of_find_property(pdev->dev.of_node, "nvmem-cells", NULL)) {
ret = imx_init_from_nvmem_cells(pdev); ret = imx_init_from_nvmem_cells(pdev);
if (ret) {
if (ret == -EPROBE_DEFER) if (ret == -EPROBE_DEFER)
return ret; return ret;
if (ret) {
dev_err(&pdev->dev, "failed to init from nvmem: %d\n", dev_err(&pdev->dev, "failed to init from nvmem: %d\n",
ret); 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