* [PATCH net v1] ath6kl:Fix error checking for debugfs_create_dir()
@ 2023-07-13 4:05 Wang Ming
2023-07-13 9:29 ` Paolo Abeni
0 siblings, 1 reply; 4+ messages in thread
From: Wang Ming @ 2023-07-13 4:05 UTC (permalink / raw)
To: Kalle Valo, Wang Ming, linux-wireless, linux-kernel; +Cc: opensource.kernel
The debugfs_create_dir() function returns error pointers,
it never returns NULL. Most incorrect error checks were fixed,
but the one in ath6kl_debug_init_fs() was forgotten.
Fix the remaining error check.
Signed-off-by: Wang Ming <machel@vivo.com>
Fixes: 9b9a4f2acac2 ("ath6kl: store firmware logs in skbuffs")
---
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.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net v1] ath6kl:Fix error checking for debugfs_create_dir()
2023-07-13 4:05 [PATCH net v1] ath6kl:Fix error checking for debugfs_create_dir() Wang Ming
@ 2023-07-13 9:29 ` Paolo Abeni
[not found] ` <SG2PR06MB374387D043556FE8AEAA6ED9BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com>
2023-07-20 6:58 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Paolo Abeni @ 2023-07-13 9:29 UTC (permalink / raw)
To: Wang Ming, Kalle Valo, linux-wireless, linux-kernel; +Cc: opensource.kernel
On Thu, 2023-07-13 at 12:05 +0800, Wang Ming wrote:
> The debugfs_create_dir() function returns error pointers,
> it never returns NULL. Most incorrect error checks were fixed,
> but the one in ath6kl_debug_init_fs() was forgotten.
>
> Fix the remaining error check.
>
> Signed-off-by: Wang Ming <machel@vivo.com>
>
> Fixes: 9b9a4f2acac2 ("ath6kl: store firmware logs in skbuffs")
The SoB tag should be after the 'Fixes' one and you must avoid empty
lines in between.
(The same applies to your other patch)
Cheers,
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread[parent not found: <SG2PR06MB374387D043556FE8AEAA6ED9BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com>]
* Re: 回复: [PATCH net v1] ath6kl:Fix error checking for debugfs_create_dir()
[not found] ` <SG2PR06MB374387D043556FE8AEAA6ED9BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com>
@ 2023-07-13 9:43 ` Paolo Abeni
0 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2023-07-13 9:43 UTC (permalink / raw)
To: 王明-软件底层技术部
Cc: Kalle Valo, linux-wireless@vger.kernel.org, LKML,
opensource.kernel
On Thu, 2023-07-13 at 09:31 +0000, 王明-软件底层技术部 wrote:
> Thank you for pointing out, I will pay attention to it in the future.
> In addition, do I need to modify this patch and submit it again?
Yes, a v2 is needed.
There are a few patches on this same topic, and I read only now what
Simon noted:
https://lore.kernel.org/linux-wireless/ZG8YY%2Fr8BLCzw93q@corigine.com/
so, the current code is likely not really buggy, and a possible cleanup
patch (such patch would _not_ be a fix) could simply remove the check
altogether.
Cheers,
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v1] ath6kl:Fix error checking for debugfs_create_dir()
2023-07-13 9:29 ` Paolo Abeni
[not found] ` <SG2PR06MB374387D043556FE8AEAA6ED9BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com>
@ 2023-07-20 6:58 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2023-07-20 6:58 UTC (permalink / raw)
To: Paolo Abeni; +Cc: Wang Ming, linux-wireless, linux-kernel, opensource.kernel
Paolo Abeni <pabeni@redhat.com> writes:
> On Thu, 2023-07-13 at 12:05 +0800, Wang Ming wrote:
>> The debugfs_create_dir() function returns error pointers,
>> it never returns NULL. Most incorrect error checks were fixed,
>> but the one in ath6kl_debug_init_fs() was forgotten.
>>
>> Fix the remaining error check.
>>
>> Signed-off-by: Wang Ming <machel@vivo.com>
>>
>> Fixes: 9b9a4f2acac2 ("ath6kl: store firmware logs in skbuffs")
>
> The SoB tag should be after the 'Fixes' one and you must avoid empty
> lines in between.
>
> (The same applies to your other patch)
And the same as with the ath9k patch: this should go to ath-next, not
net.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-20 6:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 4:05 [PATCH net v1] ath6kl:Fix error checking for debugfs_create_dir() Wang Ming
2023-07-13 9:29 ` Paolo Abeni
[not found] ` <SG2PR06MB374387D043556FE8AEAA6ED9BD37A@SG2PR06MB3743.apcprd06.prod.outlook.com>
2023-07-13 9:43 ` 回复: " Paolo Abeni
2023-07-20 6:58 ` 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).