1
0
Fork 0

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>
hifive-unleashed-5.1
Bart Van Assche 2016-11-18 15:45:56 -08:00
parent 3e5de27e94
commit 8cc3bb0789
1 changed files with 2 additions and 2 deletions

View File

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