LKML Archive on
help / color / mirror / Atom feed
From: Zhaolei <>
	"" <>
Subject: [PATCH] Fix debugfs_create_dir's error checking method for arch/sh/kernel/
Date: Fri, 17 Oct 2008 19:25:03 +0800	[thread overview]
Message-ID: <> (raw)


debugfs_create_dir() returns NULL if an error occurs, returns -ENODEV
when debugfs is not enabled in the kernel.

Signed-off-by: Zhao Lei <>
 arch/sh/kernel/setup.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index de83205..c41c4dc 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -530,6 +530,8 @@ struct dentry *sh_debugfs_root;
 static int __init sh_debugfs_init(void)
 	sh_debugfs_root = debugfs_create_dir("sh", NULL);
+	if (!sh_debugfs_root)
+		return -ENOMEM;
 	if (IS_ERR(sh_debugfs_root))
 		return PTR_ERR(sh_debugfs_root);

         reply	other threads:[~2008-10-17 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 11:25 [PATCH] Fix debugfs_create_file's error checking method for arch/sh/mm/ Zhaolei
2008-10-17 11:25 ` Zhaolei [this message]
2008-10-20  2:41   ` [PATCH] Fix debugfs_create_dir's error checking method for arch/sh/kernel/ Paul Mundt

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH] Fix debugfs_create_dir'\''s error checking method for arch/sh/kernel/' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).