Skip to content

Commit

Permalink
wifi: qtnfmac: Use netdev dummy allocator helper
Browse files Browse the repository at this point in the history
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: 61cdb09 ("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>
  • Loading branch information
Breno Leitao authored and David S. Miller committed Apr 24, 2024
1 parent 2eb5e25 commit 4a8b77e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4a8b77e

Please sign in to comment.