Commit 4a8b77ef authored by Breno Leitao's avatar Breno Leitao Committed by David S. Miller

wifi: qtnfmac: Use netdev dummy allocator helper

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: 61cdb09f ("wifi: qtnfmac: allocate dummy net_device dynamically")
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Acked-by: default avatarKalle Valo <kvalo@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2eb5e25d
...@@ -372,8 +372,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -372,8 +372,7 @@ static int qtnf_pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto error; goto error;
} }
bus->mux_dev = alloc_netdev(0, "dummy", NET_NAME_UNKNOWN, bus->mux_dev = alloc_netdev_dummy(0);
init_dummy_netdev);
if (!bus->mux_dev) { if (!bus->mux_dev) {
ret = -ENOMEM; ret = -ENOMEM;
goto error; goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment