diff mbox series

[v2] net: wireless: mwifies: fix parameter check in mwifiex_dev_debugfs_init()

Message ID 20230712112604.12572-1-duminjie@vivo.com (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show
Series [v2] net: wireless: mwifies: fix parameter check in mwifiex_dev_debugfs_init() | expand

Commit Message

Minjie Du July 12, 2023, 11:26 a.m. UTC
Make IS_ERR() judge the debugfs_create_dir() function return.

Signed-off-by: Minjie Du <duminjie@vivo.com>

v1-v2:
Fix judge typo.

---
 drivers/net/wireless/marvell/mwifiex/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/debugfs.c b/drivers/net/wireless/marvell/mwifiex/debugfs.c
index 52b18f4a7..a44bca561 100644
--- a/drivers/net/wireless/marvell/mwifiex/debugfs.c
+++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c
@@ -959,7 +959,7 @@  mwifiex_dev_debugfs_init(struct mwifiex_private *priv)
 	priv->dfs_dev_dir = debugfs_create_dir(priv->netdev->name,
 					       mwifiex_dfs_dir);
 
-	if (!priv->dfs_dev_dir)
+	if (IS_ERR(priv->dfs_dev_dir))
 		return;
 
 	MWIFIEX_DFS_ADD_FILE(info);