commit 7bb0386f102ece8819182ccf7fffe8bbebc32b19
tree 5ddc131df9f106bd7826714ee419fa5e944482bb
parent e45413eb708c1cf21082764457692c8eeac0ca97
author Akinobu Mita <[EMAIL PROTECTED]> 1161228282 +0900
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> 1163716226 -0800

debugfs: check return value correctly

The return value is stored in "*dentry", not in "dentry".

Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 fs/debugfs/inode.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index e77676d..a736d44 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -147,13 +147,13 @@ static int debugfs_create_by_name(const
        *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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to