Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anson Huang and committed by
Eduardo Valentin
925b3836 c589c566

+3 -2
+3 -2
drivers/thermal/imx_thermal.c
··· 742 742 743 743 if (of_find_property(pdev->dev.of_node, "nvmem-cells", NULL)) { 744 744 ret = imx_init_from_nvmem_cells(pdev); 745 - if (ret == -EPROBE_DEFER) 746 - return ret; 747 745 if (ret) { 746 + if (ret == -EPROBE_DEFER) 747 + return ret; 748 + 748 749 dev_err(&pdev->dev, "failed to init from nvmem: %d\n", 749 750 ret); 750 751 return ret;