projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25b3acf
)
[COMMON] thermal: samsung: Fix SVACE error
author
Hyeonseong Gil
<hs.gil@samsung.com>
Fri, 2 Sep 2016 06:54:52 +0000
(15:54 +0900)
committer
Chungwoo Park
<cww.park@samsung.com>
Mon, 21 May 2018 08:13:26 +0000
(17:13 +0900)
Avoid to divide by zero
Change-Id: Id4479af236878fa8f304c3e8d00f1a4e47c50691
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/thermal/samsung/exynos_tmu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/thermal/samsung/exynos_tmu.c
b/drivers/thermal/samsung/exynos_tmu.c
index 59f8cbfac24e772313459580ffbadcf6d02c00b2..78b46d4d4e6415f41a8a14e907c03484db86930b 100644
(file)
--- a/
drivers/thermal/samsung/exynos_tmu.c
+++ b/
drivers/thermal/samsung/exynos_tmu.c
@@
-867,7
+867,9
@@
static int exynos8895_tmu_read(struct exynos_tmu_data *data)
}
switch (data->sensing_mode) {
- case AVG : result = result / count;
+ case AVG :
+ if (count != 0)
+ result = result / count;
break;
case MAX :
case MIN :