Skip to content

Commit 2572345

Browse files
wensjmberg-intel
authored andcommitted
wifi: mwifiex: Fix dev_alloc_name() return value check
dev_alloc_name() returns the allocated ID on success, which could be over 0. Fix the return value check to check for negative error codes. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/all/aYmsQfujoAe5qO02@stanley.mountain/ Fixes: 7bab5bd ("wifi: mwifiex: Allocate dev name earlier for interface workqueue name") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com> Link: https://patch.msgid.link/20260210100337.1131279-1-wenst@chromium.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 243307a commit 2572345

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/wireless/marvell/mwifiex/cfg80211.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3148,7 +3148,7 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
31483148
SET_NETDEV_DEV(dev, adapter->dev);
31493149

31503150
ret = dev_alloc_name(dev, name);
3151-
if (ret)
3151+
if (ret < 0)
31523152
goto err_alloc_name;
31533153

31543154
priv->dfs_cac_workqueue = alloc_workqueue("MWIFIEX_DFS_CAC-%s",

0 commit comments

Comments
 (0)