
< 	cdev->debugfs = NULL;
< 
< 	mutex_unlock(&thermal_dbg->lock);
< 
< 	thermal_debugfs_remove_id(thermal_dbg);
---
> 	struct thermal_debugfs *temp = cdev->debugfs;
> 	cdev->debugfs = NULL;
> 
> 	mutex_unlock(&thermal_dbg->lock);
> 
> 	thermal_debugfs_remove_id(temp);
