projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d88348
)
thermal: exynos: fix: Check if data->tmu_read callback is present before read
author
Lukasz Majewski
<l.majewski@samsung.com>
Fri, 6 Feb 2015 13:07:10 +0000
(14:07 +0100)
committer
Zhang Rui
<rui.zhang@intel.com>
Fri, 20 Feb 2015 13:57:02 +0000
(21:57 +0800)
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: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/samsung/exynos_tmu.c
patch
|
blob
|
history
diff --git
a/drivers/thermal/samsung/exynos_tmu.c
b/drivers/thermal/samsung/exynos_tmu.c
index
fbeedc0
..
933cd80
100644
(file)
--- a/
drivers/thermal/samsung/exynos_tmu.c
+++ b/
drivers/thermal/samsung/exynos_tmu.c
@@
-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;
mutex_lock(&data->lock);