Skip to content

Commit 4afcb58

Browse files
a3fdlezcano
authored andcommitted
thermal/drivers/imx8mm: Suppress log message on probe deferral
nvmem_cell_read_u32() may return -EPROBE_DEFER if NVMEM supplier has not yet been probed. Future reprobe may succeed, so printing: i.mx8mm_thermal 3026000.tmu: Failed to read OCOTP nvmem cell (-517). to the log is confusing. Fix this by using dev_err_probe. This also elevates the message from warning to error, which is more correct: The log message is only ever printed in probe error path and probe aborts afterwards, so it really warrants an error-level message. Fixes: 4032916 ("thermal/drivers/imx: Add support for loading calibration data from OCOTP") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230708112647.2897294-1-a.fatoum@pengutronix.de
1 parent 19ad9f2 commit 4afcb58

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/thermal/imx8mm_thermal.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,8 @@ static int imx8mm_tmu_probe_set_calib_v1(struct platform_device *pdev,
178178
int ret;
179179

180180
ret = nvmem_cell_read_u32(&pdev->dev, "calib", &ana0);
181-
if (ret) {
182-
dev_warn(dev, "Failed to read OCOTP nvmem cell (%d).\n", ret);
183-
return ret;
184-
}
181+
if (ret)
182+
return dev_err_probe(dev, ret, "Failed to read OCOTP nvmem cell\n");
185183

186184
writel(FIELD_PREP(TASR_BUF_VREF_MASK,
187185
FIELD_GET(ANA0_BUF_VREF_MASK, ana0)) |

0 commit comments

Comments
 (0)