public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix debugfs_create_dir's error checking method for arm/plat-omap
@ 2008-10-17  9:23 Zhaolei
  2008-10-17 10:07 ` [PATCH v2] Fix debugfs_create_*'s " Zhaolei
  0 siblings, 1 reply; 3+ messages in thread
From: Zhaolei @ 2008-10-17  9:23 UTC (permalink / raw)
  To: Russell King, linux-kernel@vger.kernel.org

Hi,

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

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
---
 arch/arm/plat-omap/clock.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index bf6a10c..0767985 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -483,6 +483,8 @@ static int __init clk_debugfs_init(void)
 	int err;
 
 	d = debugfs_create_dir("clock", NULL);
+	if (!d)
+		return -ENOMEM;
 	if (IS_ERR(d))
 		return PTR_ERR(d);
 	clk_debugfs_root = d;
-- 
1.5.5.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-17 13:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17  9:23 [PATCH] Fix debugfs_create_dir's error checking method for arm/plat-omap Zhaolei
2008-10-17 10:07 ` [PATCH v2] Fix debugfs_create_*'s " Zhaolei
2008-10-17 13:37   ` Tony Lindgren

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