thermal: exynos: Propagate error value from tmu_read()
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 16 Apr 2018 10:11:53 +0000 (12:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2018 08:08:44 +0000 (10:08 +0200)
commit5d1639dae65f6c8b1a71a84e11d29696b7915d34
tree89b45c68a91512ecb1b9d3156d59209619364eb7
parent3cc96a4acf139c30ff5b4d0312fddaab082db699
thermal: exynos: Propagate error value from tmu_read()

commit c8da6cdef57b459ac0fd5d9d348f8460a575ae90 upstream.

tmu_read() in case of Exynos4210 might return error for out of bound
values. Current code ignores such value, what leads to reporting critical
temperature value. Add proper error code propagation to exynos_get_temp()
function.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: stable@vger.kernel.org # v4.6+
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thermal/samsung/exynos_tmu.c