public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] debugfs: check return value correctly
@ 2006-10-19  3:24 Akinobu Mita
  0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2006-10-19  3:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman

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

Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

Index: work-fault-inject/fs/debugfs/inode.c
===================================================================
--- work-fault-inject.orig/fs/debugfs/inode.c
+++ work-fault-inject/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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-10-19  3:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-19  3:24 [PATCH] debugfs: check return value correctly Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox