2023-07-12 11:29:12

by Minjie Du

[permalink] [raw]
Subject: [PATCH v2] net: wireless: mwifies: fix parameter check in mwifiex_dev_debugfs_init()

Make IS_ERR() judge the debugfs_create_dir() function return.

Signed-off-by: Minjie Du <[email protected]>

v1-v2:
Fix judge typo.

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

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);
--
2.39.0