Skip to contentSkip to conversation

ath6kl: Fix debugfs_create_dir error checking

PATCH In review Atul Raut 4 participants 4 messages Jul 31, 2023 – Aug 2, 2023

Subsystems (2)
lore
Share & tools
lore

Atul Raut

author
#0 lore raw

PATCH 1/1 ath6kl: Fix debugfs_create_dir error checking

The debugfs_create_dir function returns ERR_PTR in case of error and the correct way to check an error is 'IS_ERR' inline function.
This patch will replace the null-comparison with IS_ERR

This issue was found with the help of Coccinelle. ./drivers/net/wireless/ath/ath6kl/debug.c:1796:6-21: Wrong debugfs call error processing on line 1796

---
 drivers/net/wireless/ath/ath6kl/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/debug.c +1 -1
index 433a047f3747..505af195e299 100644
@@ -1793,7 +1793,7 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)
 {
 	ar->debugfs_phy = debugfs_create_dir("ath6kl",
 					     ar->wiphy->debugfsdir);
-	if (!ar->debugfs_phy)
+	if (IS_ERR(ar->debugfs_phy))
 		return -ENOMEM;
 
 	debugfs_create_file("tgt_stats", 0400, ar->debugfs_phy, ar,
Signature · 1 line
2.34.1
#1 lore raw

…

Quoted 2 lines

This issue was found with the help of Coccinelle. ./drivers/net/wireless/ath/ath6kl/debug.c:1796:6-21: Wrong debugfs call error processing on line 1796

Would you like to compare this change approach with a previous contribution?

[PATCH net-next v4] wifi: ath6kl: Remove error checking for debugfs_create_dir()
https://lore.kernel.org/lkml/[email protected]/
https://lkml.org/lkml/2023/7/26/625?

Regards,
Markus
_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

#2 lore raw

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless review comment to a patch submission on a Linux kernel developer mailing list. I strongly suggest that you not do this anymore. Please do not bother developers who are actively working to produce patches and features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to follow it at all. The person/bot/AI that sent it is being ignored by almost all Linux kernel maintainers for having a persistent pattern of behavior of producing distracting and pointless commentary, and inability to adapt to feedback. Please feel free to also ignore emails from them.

thanks,

greg k-h's patch email bot

#3 lore raw
In reply to Atul Raut
Quoted 9 lines · Atul Raut

The debugfs_create_dir function returns ERR_PTR in case of error and the correct way to check an error is 'IS_ERR' inline function.
This patch will replace the null-comparison with IS_ERR

This issue was found with the help of Coccinelle. ./drivers/net/wireless/ath/ath6kl/debug.c:1796:6-21: Wrong debugfs call error processing on line 1796

This has been already fixed:
https://git.kernel.org/kvalo/ath/c/1301783c8def

Patch set to Rejected.

Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
Linux-kernel-mentees mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees