qoriq_tmu_probe ->
qoriq_tmu_register_tmu_zone ->
devfreq_cooling_register: return 0
sensor->cdev->type: crash

the fix codes come from:
https://github.com/nxp-imx/linux-imx/blob/lf-6.1.y/include/linux/device_cooling.h

Unable to handle kernel NULL pointer dereference at virtual address 
0000000000000008
pc : qoriq_tmu_probe+0x568/0x5b0
lr : qoriq_tmu_probe+0x440/0x5b0
Call trace:
qoriq_tmu_probe+0x568/0x5b0
...
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Signed-off-by: Li Wang <li.w...@windriver.com>
---
 include/linux/device_cooling.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/device_cooling.h b/include/linux/device_cooling.h
index 18d9e3b90ed9..f318e22c1472 100644
--- a/include/linux/device_cooling.h
+++ b/include/linux/device_cooling.h
@@ -33,7 +33,7 @@ int unregister_devfreq_cooling_notifier(struct notifier_block 
*nb)
 static inline
 struct thermal_cooling_device *devfreq_cooling_register(void)
 {
-       return NULL;
+       return ERR_PTR(-EINVAL);
 }
 
 static inline
-- 
2.35.5

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12638): 
https://lists.yoctoproject.org/g/linux-yocto/message/12638
Mute This Topic: https://lists.yoctoproject.org/mt/99063446/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to