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 <>
Acked-by: default avatarViresh Kumar <>
Reviewed-by: default avatarDaniel Lezcano <>
Signed-off-by: default avatarEduardo Valentin <>
parent c589c566
......@@ -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 == -EPROBE_DEFER)
return ret;
if (ret) {
if (ret == -EPROBE_DEFER)
return ret;
dev_err(&pdev->dev, "failed to init from nvmem: %d\n",
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