From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Date: Fri, 21 Jun 2013 02:42:19 +0000 (+0800)
Subject: ipw2200: fix error return code in ipw_load()
X-Git-Tag: firefly_0821_release~176^2~5751^2~78^2^2~38
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5d9e3bc21c57d600b706a31454d5cf2f68c24f53;p=firefly-linux-kernel-4.4.55.git

ipw2200: fix error return code in ipw_load()

Fix to return -ENOMEM in the ipw_rx_queue_alloc() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c
index d96257b79a84..312fa0e42e6f 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/ipw2x00/ipw2200.c
@@ -3548,6 +3548,7 @@ static int ipw_load(struct ipw_priv *priv)
 		ipw_rx_queue_reset(priv, priv->rxq);
 	if (!priv->rxq) {
 		IPW_ERROR("Unable to initialize Rx queue\n");
+		rc = -ENOMEM;
 		goto error;
 	}