linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP3+: PM debug: fix the use of debugfs_create_* API
@ 2012-01-31 11:20 Jean Pihet
  2012-01-31 17:44 ` Kevin Hilman
  2012-02-01  8:37 ` [PATCH] ARM: OMAP2+: " Jean Pihet
  0 siblings, 2 replies; 5+ messages in thread
From: Jean Pihet @ 2012-01-31 11:20 UTC (permalink / raw)
  To: linux-arm-kernel

The debugfs_create_* API returns a NULL ptr in case of problem.
Fix the PM debug code to take this into account.

Signed-off-by: Jean Pihet <j-pihet@ti.com>
---
 arch/arm/mach-omap2/pm-debug.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 4411163..e5bf367 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -264,8 +264,8 @@ static int __init pm_dbg_init(void)
 		return 0;
 
 	d = debugfs_create_dir("pm_debug", NULL);
-	if (IS_ERR(d))
-		return PTR_ERR(d);
+	if (!d)
+		return -ENOMEM;
 
 	(void) debugfs_create_file("count", S_IRUGO,
 		d, (void *)DEBUG_FILE_COUNTERS, &debug_fops);
-- 
1.7.5.4

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

end of thread, other threads:[~2012-02-01 17:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-31 11:20 [PATCH] ARM: OMAP3+: PM debug: fix the use of debugfs_create_* API Jean Pihet
2012-01-31 17:44 ` Kevin Hilman
2012-02-01  8:34   ` Jean Pihet
2012-02-01  8:37 ` [PATCH] ARM: OMAP2+: " Jean Pihet
2012-02-01 17:37   ` Kevin Hilman

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).