Browse Source

target: Use NULL instead of 0 to represent a pointer

This has been detected by sparse.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Bart Van Assche 8 years ago
parent
commit
8cc3bb0789
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/target/target_core_configfs.c

+ 2 - 2
drivers/target/target_core_configfs.c

@@ -144,12 +144,12 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 	if (!S_ISDIR(fp->f_inode->i_mode)) {
 	if (!S_ISDIR(fp->f_inode->i_mode)) {
-		filp_close(fp, 0);
+		filp_close(fp, NULL);
 		mutex_unlock(&g_tf_lock);
 		mutex_unlock(&g_tf_lock);
 		pr_err("db_root: not a directory: %s\n", db_root_stage);
 		pr_err("db_root: not a directory: %s\n", db_root_stage);
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
-	filp_close(fp, 0);
+	filp_close(fp, NULL);
 
 
 	strncpy(db_root, db_root_stage, read_bytes);
 	strncpy(db_root, db_root_stage, read_bytes);