diff
<     struct thermal_debugfs *thermal_dbg = cdev->debugfs;
---
>     struct thermal_debugfs *thermal_dbg;
>     if (!cdev) {
>         pr_err("thermal_debug_cdev_remove: cdev is NULL\n");
>         return;
>     }
>     thermal_dbg = cdev->debugfs;
