[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230524160352.19704-1-osmtendev@gmail.com>
Date: Wed, 24 May 2023 21:03:52 +0500
From: Osama Muhammad <osmtendev@...il.com>
To: nbd@....name, ryder.lee@...iatek.com, lorenzo@...nel.org,
shayne.chen@...iatek.com, davem@...emloft.net
Cc: linux-wireless@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-kernel@...r.kernel.org, Osama Muhammad <osmtendev@...il.com>
Subject: [PATCH] debugfs.c: Fix error checking for debugfs_create_dir
This patch fixes the error checking in debugfs.c in
debugfs_create_dir. The correct way to check if an error occurred
is using 'IS_ERR' inline function.
Signed-off-by: Osama Muhammad <osmtendev@...il.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 57fbcc83e074..d9ba700131fd 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.34.1
Powered by blists - more mailing lists