[PATCH v1] drivers: wireless: mt76: fix parameter check in mt76_register_debugfs_fops()
Minjie Du
duminjie at vivo.com
Wed Jul 12 06:00:05 PDT 2023
Make IS_ERR() judge the debugfs_create_dir() function return
in mt76_register_debugfs_fops().
Signed-off-by: Minjie Du <duminjie at 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
More information about the linux-arm-kernel
mailing list