Skip to contentSkip to conversation

nfcsim.c: Fix error checking for debugfs_create_dir

PATCH Applied Osama Muhammad 3 participants 3 messages May 25, 2023 – May 26, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nfcsim.c: Fix error checking for debugfs_create_dir

This patch fixes the error checking in nfcsim.c. The DebugFS kernel API is developed in
a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes.

---

changes since v1:
-Dropped the error checking for debugfs_create_dir

---
 drivers/nfc/nfcsim.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/nfc/nfcsim.c +0 -4
index 44eeb17ae48d..a55381f80cd6 100644
@@ -336,10 +336,6 @@ static struct dentry *nfcsim_debugfs_root;
 static void nfcsim_debugfs_init(void)
 {
 	nfcsim_debugfs_root = debugfs_create_dir("nfcsim", NULL);
-
-	if (!nfcsim_debugfs_root)
-		pr_err("Could not create debugfs entry\n");
-
 }
 
 static void nfcsim_debugfs_remove(void)
Signature · 1 line
2.34.1
#2 lore raw
In reply to Osama Muhammad
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Thu, 25 May 2023 22:27:46 +0500 you wrote:

This patch fixes the error checking in nfcsim.c. The DebugFS kernel API is developed in
a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes.

[...]

Here is the summary with links:
- [v2] nfcsim.c: Fix error checking for debugfs_create_dir

    https://git.kernel.org/netdev/net/c/9b9e46aa0727

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html