* [PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops()
@ 2023-07-12 13:00 Minjie Du
2023-07-12 14:00 ` Nicolas Escande
0 siblings, 1 reply; 2+ messages in thread
From: Minjie Du @ 2023-07-12 13:00 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Shayne Chen,
Sean Wang, Kalle Valo, Matthias Brugger,
AngeloGioacchino Del Regno,
open list:MEDIATEK MT76 WIRELESS LAN DRIVER,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
Cc: opensource.kernel, Minjie Du
Make IS_ERR() judge the debugfs_create_dir() function return
in mt76_register_debugfs_fops().
Signed-off-by: Minjie Du <duminjie@vivo.com>
---
drivers/net/wireless/mediatek/mt76/debugfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c
index 57fbcc83e..d9ba70013 100644
--- a/drivers/net/wireless/mediatek/mt76/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
@@ -109,7 +109,7 @@ mt76_register_debugfs_fops(struct mt76_phy *phy,
struct dentry *dir;
dir = debugfs_create_dir("mt76", phy->hw->wiphy->debugfsdir);
- if (!dir)
+ if (IS_ERR(dir))
return NULL;
debugfs_create_u8("led_pin", 0600, dir, &phy->leds.pin);
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops()
2023-07-12 13:00 [PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops() Minjie Du
@ 2023-07-12 14:00 ` Nicolas Escande
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Escande @ 2023-07-12 14:00 UTC (permalink / raw)
To: Minjie Du, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Kalle Valo, Matthias Brugger,
AngeloGioacchino Del Regno,
open list:MEDIATEK MT76 WIRELESS LAN DRIVER,
open list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support,
moderated list:ARM/Mediatek SoC support
Cc: opensource.kernel
On Wed Jul 12, 2023 at 3:00 PM CEST, Minjie Du wrote:
> Make IS_ERR() judge the debugfs_create_dir() function return
> in mt76_register_debugfs_fops().
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
> drivers/net/wireless/mediatek/mt76/debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/debugfs.c b/drivers/net/wireless/mediatek/mt76/debugfs.c
> index 57fbcc83e..d9ba70013 100644
> --- a/drivers/net/wireless/mediatek/mt76/debugfs.c
> +++ b/drivers/net/wireless/mediatek/mt76/debugfs.c
> @@ -109,7 +109,7 @@ mt76_register_debugfs_fops(struct mt76_phy *phy,
> struct dentry *dir;
>
> dir = debugfs_create_dir("mt76", phy->hw->wiphy->debugfsdir);
> - if (!dir)
> + if (IS_ERR(dir))
> return NULL;
Check the mailing list this subject has been discussed many times...
I believe the current state of the art is to remove the check altogether
>
> debugfs_create_u8("led_pin", 0600, dir, &phy->leds.pin);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-12 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 13:00 [PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops() Minjie Du
2023-07-12 14:00 ` Nicolas Escande
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).