]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wifi: qtnfmac: Use netdev dummy allocator helper
authorBreno Leitao <leitao@debian.org>
Mon, 22 Apr 2024 12:39:01 +0000 (05:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Apr 2024 11:00:17 +0000 (12:00 +0100)
There is a new dummy netdev allocator, use it instead of
alloc_netdev()/init_dummy_netdev combination.

Using alloc_netdev() with init_dummy_netdev might cause some memory
corruption at the driver removal side.

Fixes: 61cdb09ff760 ("wifi: qtnfmac: allocate dummy net_device dynamically")
Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Kalle Valo <kvalo@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c

index f8f55db2f454d4068ba8553ed770c439b7f09343..f66eb43094d4fc8b5819bc2ef0d1ccc209c7ccae 100644 (file)
@@ -372,8 +372,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                goto error;
        }
 
-       bus->mux_dev = alloc_netdev(0, "dummy", NET_NAME_UNKNOWN,
-                                   init_dummy_netdev);
+       bus->mux_dev = alloc_netdev_dummy(0);
        if (!bus->mux_dev) {
                ret = -ENOMEM;
                goto error;