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: Anson Huang <Anson.Huang@nxp.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
Anson Huang 2018-11-21 05:49:40 +00:00 коммит произвёл Eduardo Valentin
Родитель c589c56671
Коммит 925b383618
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -742,9 +742,10 @@ static int imx_thermal_probe(struct platform_device *pdev)
if (of_find_property(pdev->dev.of_node, "nvmem-cells", NULL)) {
ret = imx_init_from_nvmem_cells(pdev);
if (ret) {
if (ret == -EPROBE_DEFER)
return ret;
if (ret) {
dev_err(&pdev->dev, "failed to init from nvmem: %d\n",
ret);
return ret;