diff mbox series

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

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

Commit Message

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

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 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..5af49c810 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);