Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

adm80211: return an error if adm8211_alloc_rings() fails

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

Fixes: cc0b88cf5ecf ("[PATCH] Add adm8211 802.11b wireless driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Dan Carpenter and committed by
Kalle Valo
c705a6b3 ae3cf476

+2 -1
+2 -1
drivers/net/wireless/admtek/adm8211.c
··· 1863 1863 priv->rx_ring_size = rx_ring_size; 1864 1864 priv->tx_ring_size = tx_ring_size; 1865 1865 1866 - if (adm8211_alloc_rings(dev)) { 1866 + err = adm8211_alloc_rings(dev); 1867 + if (err) { 1867 1868 printk(KERN_ERR "%s (adm8211): Cannot allocate TX/RX ring\n", 1868 1869 pci_name(pdev)); 1869 1870 goto err_iounmap;