aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/debugfs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index e77676df6713..a736d44989c4 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -147,13 +147,13 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
147 *dentry = NULL; 147 *dentry = NULL;
148 mutex_lock(&parent->d_inode->i_mutex); 148 mutex_lock(&parent->d_inode->i_mutex);
149 *dentry = lookup_one_len(name, parent, strlen(name)); 149 *dentry = lookup_one_len(name, parent, strlen(name));
150 if (!IS_ERR(dentry)) { 150 if (!IS_ERR(*dentry)) {
151 if ((mode & S_IFMT) == S_IFDIR) 151 if ((mode & S_IFMT) == S_IFDIR)
152 error = debugfs_mkdir(parent->d_inode, *dentry, mode); 152 error = debugfs_mkdir(parent->d_inode, *dentry, mode);
153 else 153 else
154 error = debugfs_create(parent->d_inode, *dentry, mode); 154 error = debugfs_create(parent->d_inode, *dentry, mode);
155 } else 155 } else
156 error = PTR_ERR(dentry); 156 error = PTR_ERR(*dentry);
157 mutex_unlock(&parent->d_inode->i_mutex); 157 mutex_unlock(&parent->d_inode->i_mutex);
158 158
159 return error; 159 return error;