[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230516182927.9171-1-osmtendev@gmail.com>
Date: Tue, 16 May 2023 23:29:27 +0500
From: Osama Muhammad <osmtendev@...il.com>
To: tony.luck@...el.com, bp@...en8.de
Cc: linux-edac@...r.kernel.org, linux-kernel@...r.kernel.org,
Osama Muhammad <osmtendev@...il.com>
Subject: [PATCH] ras:debugfs.c: Fix error checking for debugfs_create_dir
This patch fixes the error checking in debugfs.c in debugfs_create_dir.
The correct way to check if an error occurred is 'IS_ERR' inline function.
Signed-off-by: Osama Muhammad <osmtendev@...il.com>
---
drivers/ras/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c
index f0a6391b1146..ffb973c328e3 100644
--- a/drivers/ras/debugfs.c
+++ b/drivers/ras/debugfs.c
@@ -46,7 +46,7 @@ int __init ras_add_daemon_trace(void)
fentry = debugfs_create_file("daemon_active", S_IRUSR, ras_debugfs_dir,
NULL, &trace_fops);
- if (!fentry)
+ if (IS_ERR(fentry))
return -ENODEV;
return 0;
--
2.34.1
Powered by blists - more mailing lists