[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1277644847-16292-3-git-send-email-segooon@gmail.com>
Date: Sun, 27 Jun 2010 17:20:45 +0400
From: Kulikov Vasiliy <segooon@...il.com>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: Lior Dotan <liodot@...il.com>, <charrer@...critech.com>,
Denis Kirjanov <kirjanov@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jiri Pirko <jpirko@...hat.com>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] staging: slicoss: Move NULL pointer assertion to else branch
Move NULL pointer assertion to else branch because it can
become NULL only here.
Signed-off-by: Kulikov Vasiliy <segooon@...il.com>
---
drivers/staging/slicoss/slicoss.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
index 102d3ea..86bc733 100644
--- a/drivers/staging/slicoss/slicoss.c
+++ b/drivers/staging/slicoss/slicoss.c
@@ -2263,11 +2263,11 @@ static u32 slic_card_locate(struct adapter *adapter)
break;
card = card->next;
}
+ ASSERT(card);
+ if (!card)
+ return -ENOMEM;
}
- ASSERT(card);
- if (!card)
- return -ENOMEM;
/* Put the adapter in the card's adapter list */
ASSERT(card->adapter[adapter->port] == NULL);
if (!card->adapter[adapter->port]) {
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists