Commit 2a1d18a5 authored by Osama Muhammad's avatar Osama Muhammad Committed by Borislav Petkov (AMD)
Browse files

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: default avatarOsama Muhammad <osmtendev@gmail.com>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230516182927.9171-1-osmtendev@gmail.com
parent e40879b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;