]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
debugfs: check return value correctly
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 19 Oct 2006 03:24:42 +0000 (12:24 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Nov 2006 22:30:26 +0000 (14:30 -0800)
The return value is stored in "*dentry", not in "dentry".

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/debugfs/inode.c

index e77676df6713de8ab4016d89688b2405ba89e63b..a736d44989c4612e193a6ba6ad74a8b861d8383b 100644 (file)
@@ -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;