From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 2/3] debugfs: check return value correctly
Date: Thu, 16 Nov 2006 16:41:37 -0800 [thread overview]
Message-ID: <11637241024111-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11637240981960-git-send-email-greg@kroah.com>
From: Akinobu Mita <akinobu.mita@gmail.com>
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 | 4 ++--
1 files 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;
--
1.4.3.5
next prev parent reply other threads:[~2006-11-17 0:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-17 0:07 [GIT PATCH] Misc Driver fixes for 2.6.19-rc6 Greg KH
2006-11-17 0:41 ` [PATCH 1/3] W1: ioremap balanced with iounmap Greg KH
2006-11-17 0:41 ` Greg KH [this message]
2006-11-17 0:41 ` [PATCH 3/3] aoe: Add forgotten NULL at end of attribute list in aoeblk.c Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11637241024111-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=akinobu.mita@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome