diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-07-08 14:26:46 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-08-16 10:54:39 +0300 |
commit | 4afcb58ea47e66c025d2b0a5f091dce5aaf95b0f (patch) | |
tree | 37d762af31db925b4a0a2dd72fcc28c70c8336eb /drivers/thermal/imx8mm_thermal.c | |
parent | 19ad9f29751ca385262c63f513f75610962c40a0 (diff) | |
download | linux-4afcb58ea47e66c025d2b0a5f091dce5aaf95b0f.tar.xz |
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 30260000.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: 403291648823 ("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
Diffstat (limited to 'drivers/thermal/imx8mm_thermal.c')
-rw-r--r-- | drivers/thermal/imx8mm_thermal.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c index e89b11b3f2b9..14111ccf6e4c 100644 --- a/drivers/thermal/imx8mm_thermal.c +++ b/drivers/thermal/imx8mm_thermal.c @@ -178,10 +178,8 @@ static int imx8mm_tmu_probe_set_calib_v1(struct platform_device *pdev, int ret; ret = nvmem_cell_read_u32(&pdev->dev, "calib", &ana0); - if (ret) { - dev_warn(dev, "Failed to read OCOTP nvmem cell (%d).\n", ret); - return ret; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to read OCOTP nvmem cell\n"); writel(FIELD_PREP(TASR_BUF_VREF_MASK, FIELD_GET(ANA0_BUF_VREF_MASK, ana0)) | |