]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:40 +0000 (19:51 -0600)
commiteeb2c29dfb629a67c7a4ddc5b05241f4a9e0af8b
tree7f7a051ecb2999bc4fcae7360f83c81625395bc0
parenta78d34572c4988e532f136658d36c2dce2049bd8
thermal: i.MX: Allow thermal probe to fail gracefully in case of bad calibration.

BugLink: https://bugs.launchpad.net/bugs/1836287
[ Upstream commit be926ceeb4efc3bf44cb9b56f5c71aac9b1f8bbe ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/thermal/imx_thermal.c