Commit 4531fa16 authored by Lukasz Majewski's avatar Lukasz Majewski Committed by Zhang Rui
Browse files

thermal: exynos: fix: Check if data->tmu_read callback is present before read

The exynos_tmu_data() function should on entrance test not only for valid
data pointer, but also for data->tmu_read one.
It is important, since afterwards it is dereferenced to get temperature code.
Signed-off-by: default avatarLukasz Majewski <>
Tested-by: default avatarAbhilash Kesavan <>
Signed-off-by: default avatarZhang Rui <>
parent 3d883483
......@@ -716,7 +716,7 @@ static int exynos_get_temp(void *p, long *temp)
struct exynos_tmu_data *data = p;
if (!data)
if (!data || !data->tmu_read)
return -EINVAL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment