From: Akinobu Mita Date: Thu, 19 Oct 2006 03:24:42 +0000 (+0900) Subject: debugfs: check return value correctly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7bb0386f102ece8819182ccf7fffe8bbebc32b19;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git debugfs: check return value correctly The return value is stored in "*dentry", not in "dentry". Signed-off-by: Akinobu Mita Signed-off-by: Greg Kroah-Hartman --- 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, *dentry = NULL; mutex_lock(&parent->d_inode->i_mutex); *dentry = lookup_one_len(name, parent, strlen(name)); - if (!IS_ERR(dentry)) { + if (!IS_ERR(*dentry)) { if ((mode & S_IFMT) == S_IFDIR) error = debugfs_mkdir(parent->d_inode, *dentry, mode); else error = debugfs_create(parent->d_inode, *dentry, mode); } else - error = PTR_ERR(dentry); + error = PTR_ERR(*dentry); mutex_unlock(&parent->d_inode->i_mutex); return error;