Subject: [PATCH 06/18] ipw2200: Do not continue loading the firmware if kmalloc fails

From: Zhu Yi <[email-masked]>
Date: Thu, 13 Apr 2006 17:19:50 +0800

Signed-off-by: Ingo Molnar <[email-masked]>
Cc: "Zhu, Yi" <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>

---

 drivers/net/wireless/ipw2200.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

bb9de6f2888b04991bc634e9700114d3b415cdcb
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index c38fb90..febee43 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -10666,6 +10666,7 @@ static int ipw_up(struct ipw_priv *priv)
 		if (priv->cmdlog == NULL) {
 			IPW_ERROR("Error allocating %d command log entries.\n",
 				  cmdlog);
+			return -ENOMEM;
 		} else {
 			memset(priv->cmdlog, 0, sizeof(*priv->cmdlog) * cmdlog);
 			priv->cmdlog_len = cmdlog;
-- 
1.2.6