Explorar o código

msm: camera: utils: Modify pointer check for clk debugfs

Modify pointer check when creating clk debugfs in soc utils.

CRs-Fixed: 2841729
Change-Id: I4d23c94cc5424809e445ba7e6321a568e14bfe5f
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram %!s(int64=4) %!d(string=hai) anos
pai
achega
fdc5430f3e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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,