diff
<     struct thermal_debugfs *thermal_dbg = cdev->debugfs;
---
>     struct thermal_debugfs *thermal_dbg;
>     if (!cdev) return;
>     thermal_dbg = cdev->debugfs;
