]> git.hungrycats.org Git - linux/commit
thermal/drivers/imx8mm: Suppress log message on probe deferral
authorAhmad Fatoum <a.fatoum@pengutronix.de>
Sat, 8 Jul 2023 11:26:46 +0000 (13:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:35 +0000 (09:48 +0200)
commite3aa6884fae91b10449bbc1d066b39547787cdf4
tree452124565edd2a234b9fb7e9b6c88339f4b4bfd3
parentdb478bcb3161894c15f9f17d19be8bc4d30946a5
thermal/drivers/imx8mm: Suppress log message on probe deferral

[ Upstream commit 4afcb58ea47e66c025d2b0a5f091dce5aaf95b0f ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/thermal/imx8mm_thermal.c