summaryrefslogtreecommitdiff
path: root/drivers/ras
diff options
context:
space:
mode:
authorOsama Muhammad <osmtendev@gmail.com>2023-05-16 23:29:27 +0500
committerBorislav Petkov (AMD) <bp@alien8.de>2023-05-16 21:12:23 +0200
commit2a1d18a5dc5056825b8e9527d188130da6256efc (patch)
tree0909014548781f025a281f0b30a8b48784cc4721 /drivers/ras
parente40879b6d7d858b03813cd53c17dfef9c297f525 (diff)
ras/debugfs: Fix error checking for debugfs_create_dir()
Check the return value of debugfs_create_dir() properly. [ bp: Rewrite commit message. ] Signed-off-by: Osama Muhammad <osmtendev@gmail.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://lore.kernel.org/r/20230516182927.9171-1-osmtendev@gmail.com
Diffstat (limited to 'drivers/ras')
-rw-r--r--drivers/ras/debugfs.c2
1 files changed, 1 insertions, 1 deletions
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;