Browse Source

Merge "msm: camera: utils: Modify pointer check for clk debugfs" into camera-kernel.lnx.5.0

Camera Software Integration 4 năm trước cách đây
mục cha
commit
5341e5810f
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      drivers/cam_utils/cam_soc_util.c

+ 2 - 1
drivers/cam_utils/cam_soc_util.c

@@ -186,7 +186,7 @@ static int cam_soc_util_create_clk_lvl_debugfs(struct cam_hw_soc_info *soc_info)
 	int rc = 0;
 	struct dentry *dbgfileptr = NULL;
 
-	if (!soc_info->dentry) {
+	if (soc_info->dentry) {
 		CAM_DBG(CAM_UTIL, "Debugfs entry for %s already exist",
 			soc_info->dev_name);
 		goto end;
@@ -232,6 +232,7 @@ static void cam_soc_util_remove_clk_lvl_debugfs(
 	struct cam_hw_soc_info *soc_info)
 {
 	debugfs_remove_recursive(soc_info->dentry);
+	soc_info->dentry = NULL;
 }
 
 int cam_soc_util_get_level_from_string(const char *string,