linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] adm80211: return an error if adm8211_alloc_rings() fails
@ 2016-12-07 11:21 Dan Carpenter
  2016-12-30 11:32 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-12-07 11:21 UTC (permalink / raw)
  To: Kalle Valo, Michael Wu
  Cc: Alexey Khoroshilov, Johannes Berg, linux-wireless,
	kernel-janitors

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>

diff --git a/drivers/net/wireless/admtek/adm8211.c b/drivers/net/wireless/admtek/adm8211.c
index 2b4a3eb38dfa..098c814e22c8 100644
--- a/drivers/net/wireless/admtek/adm8211.c
+++ b/drivers/net/wireless/admtek/adm8211.c
@@ -1863,7 +1863,8 @@ static int adm8211_probe(struct pci_dev *pdev,
 	priv->rx_ring_size = rx_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",
 		       pci_name(pdev));
 		goto err_iounmap;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-30 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 11:21 [patch] adm80211: return an error if adm8211_alloc_rings() fails Dan Carpenter
2016-12-30 11:32 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).