linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: Fix debugfs_create_dir error checking
@ 2023-07-31  2:45 Atul Raut
       [not found] ` <8b6229da-ca60-f352-f374-47f9b6d33862@web.de>
  2023-08-02 18:23 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Atul Raut @ 2023-07-31  2:45 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, linux-kernel, linux-kernel-mentees

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

Signed-off-by: Atul Raut <rauji.raut@gmail.com>
---
 drivers/net/wireless/ath/ath6kl/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 433a047f3747..505af195e299 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -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,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath6kl: Fix debugfs_create_dir error checking
       [not found] ` <8b6229da-ca60-f352-f374-47f9b6d33862@web.de>
@ 2023-07-31  6:01   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2023-07-31  6:01 UTC (permalink / raw)
  To: Markus Elfring
  Cc: Atul Raut, linux-kernel-mentees, linux-wireless, kernel-janitors,
	Kalle Valo, Stephen Rothwell, Wang Ming, opensource.kernel, LKML,
	Minjie Du

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath6kl: Fix debugfs_create_dir error checking
  2023-07-31  2:45 [PATCH] ath6kl: Fix debugfs_create_dir error checking Atul Raut
       [not found] ` <8b6229da-ca60-f352-f374-47f9b6d33862@web.de>
@ 2023-08-02 18:23 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2023-08-02 18:23 UTC (permalink / raw)
  To: Atul Raut; +Cc: linux-wireless, linux-kernel, linux-kernel-mentees

Atul Raut <rauji.raut@gmail.com> wrote:

> 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
> 
> Signed-off-by: Atul Raut <rauji.raut@gmail.com>

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

Patch set to Rejected.

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230731024542.27248-1-rauji.raut@gmail.com/

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-02 18:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-31  2:45 [PATCH] ath6kl: Fix debugfs_create_dir error checking Atul Raut
     [not found] ` <8b6229da-ca60-f352-f374-47f9b6d33862@web.de>
2023-07-31  6:01   ` Greg KH
2023-08-02 18:23 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).