]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: i.MX: Allow thermal probe to fail gracefully in case of bad calibration.
authorJean-Christophe Dubois <jcd@tribudubois.net>
Sat, 30 Jun 2018 22:10:50 +0000 (00:10 +0200)
committerEduardo Valentin <edubezval@gmail.com>
Mon, 2 Jul 2018 17:34:33 +0000 (10:34 -0700)
commitbe926ceeb4efc3bf44cb9b56f5c71aac9b1f8bbe
treebdc0c11301d9f3a5c4b03f125951f2834d358e83
parent021c91791a5e7e85c567452f1be3e4c2c6cb6063
thermal: i.MX: Allow thermal probe to fail gracefully in case of bad calibration.

Without this fix, the thermal probe on i.MX6 might trigger a division
by zero exception later in the probe if the calibration does fail.

Note: This linux behavior (Division by zero in kernel) has been triggered
on a Qemu i.MX6 emulation where parameters in nvmem were not set. With this
fix the division by zero is not triggeed anymore as the thermal probe does
fail early.

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
drivers/thermal/imx_thermal.c