
< 	mutex_unlock(&thermal_dbg->lock);
< 
< 	thermal_debugfs_remove_id(thermal_dbg);
---
> 	mutex_unlock(&thermal_dbg->lock);
> 
> 	if (thermal_dbg)
> 		thermal_debugfs_remove_id(thermal_dbg);
