* [bug report] wifi: mwifiex: Allocate dev name earlier for interface workqueue name
[not found] <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
@ 2026-02-09 9:43 ` Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-02-09 9:43 UTC (permalink / raw)
To: Chen-Yu Tsai; +Cc: Francesco Dolcini, linux-wireless, linux-kernel
[ Smatch checking is paused while we raise funding. #SadFace
https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]
Hello Chen-Yu Tsai,
Commit 7bab5bdb81e3 ("wifi: mwifiex: Allocate dev name earlier for
interface workqueue name") from Jan 7, 2026 (linux-next), leads to
the following Smatch static checker warning:
drivers/net/wireless/marvell/mwifiex/cfg80211.c:3214 mwifiex_add_virtual_intf()
warn: passing positive error code '(-23)-(-22),(-12),1-64' to 'ERR_PTR'
drivers/net/wireless/marvell/mwifiex/cfg80211.c
3147
3148 SET_NETDEV_DEV(dev, adapter->dev);
3149
3150 ret = dev_alloc_name(dev, name);
3151 if (ret)
3152 goto err_alloc_name;
The dev_alloc_name() function can return 1-64 if the name has a "%d" in
it. None of the other nine callers use the positive returns. The only
thing it does is cause a crash here. We should probably fix
dev_alloc_name() as well as changing this to if (ret < 0) {.
3153
3154 priv->dfs_cac_workqueue = alloc_workqueue("MWIFIEX_DFS_CAC-%s",
3155 WQ_HIGHPRI |
3156 WQ_MEM_RECLAIM |
3157 WQ_UNBOUND, 0, dev->name);
3158 if (!priv->dfs_cac_workqueue) {
3159 mwifiex_dbg(adapter, ERROR, "cannot alloc DFS CAC queue\n");
3160 ret = -ENOMEM;
3161 goto err_alloc_cac;
3162 }
3163
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-09 9:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
2026-02-09 9:43 ` [bug report] wifi: mwifiex: Allocate dev name earlier for interface workqueue name Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox