aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-11-18 18:45:56 -0500
committerBart Van Assche <bart.vanassche@sandisk.com>2016-12-09 13:20:01 -0500
commit8cc3bb0789eab91e5543c7b9fbc3bde7f9c8973b (patch)
tree5f11ca6a0da43d5d3c111f8a8bd6e9d9cf17c9e8
parent3e5de27e940d00d8d504dfb96625fb654f641509 (diff)
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>
-rw-r--r--drivers/target/target_core_configfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 2001005bef45..3bf6384c0f96 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -144,12 +144,12 @@ static ssize_t target_core_item_dbroot_store(struct config_item *item,
144 return -EINVAL; 144 return -EINVAL;
145 } 145 }
146 if (!S_ISDIR(fp->f_inode->i_mode)) { 146 if (!S_ISDIR(fp->f_inode->i_mode)) {
147 filp_close(fp, 0); 147 filp_close(fp, NULL);
148 mutex_unlock(&g_tf_lock); 148 mutex_unlock(&g_tf_lock);
149 pr_err("db_root: not a directory: %s\n", db_root_stage); 149 pr_err("db_root: not a directory: %s\n", db_root_stage);
150 return -EINVAL; 150 return -EINVAL;
151 } 151 }
152 filp_close(fp, 0); 152 filp_close(fp, NULL);
153 153
154 strncpy(db_root, db_root_stage, read_bytes); 154 strncpy(db_root, db_root_stage, read_bytes);
155 155