Skip to content

Commit 2a1d18a

Browse files
osmtenbp3tk0v
authored andcommitted
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
1 parent e40879b commit 2a1d18a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ras/debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int __init ras_add_daemon_trace(void)
4646

4747
fentry = debugfs_create_file("daemon_active", S_IRUSR, ras_debugfs_dir,
4848
NULL, &trace_fops);
49-
if (!fentry)
49+
if (IS_ERR(fentry))
5050
return -ENODEV;
5151

5252
return 0;

0 commit comments

Comments
 (0)