Commit f78f3899 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Hutchings

adm80211: return an error if adm8211_alloc_rings() fails

commit c705a6b3 upstream.

We accidentally return success when adm8211_alloc_rings() fails but we
should preserve the error code.

Fixes: cc0b88cf ("[PATCH] Add adm8211 802.11b wireless driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
[bwh: Backported to 3.16: adjust filename]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 3eef21d5
...@@ -1843,7 +1843,8 @@ static int adm8211_probe(struct pci_dev *pdev, ...@@ -1843,7 +1843,8 @@ static int adm8211_probe(struct pci_dev *pdev,
priv->rx_ring_size = rx_ring_size; priv->rx_ring_size = rx_ring_size;
priv->tx_ring_size = tx_ring_size; priv->tx_ring_size = tx_ring_size;
if (adm8211_alloc_rings(dev)) { err = adm8211_alloc_rings(dev);
if (err) {
printk(KERN_ERR "%s (adm8211): Cannot allocate TX/RX ring\n", printk(KERN_ERR "%s (adm8211): Cannot allocate TX/RX ring\n",
pci_name(pdev)); pci_name(pdev));
goto err_iounmap; goto err_iounmap;
......
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