Move NULL pointer assertion to else branch because it can become NULL only here. Signed-off-by: Kulikov Vasiliy <segooon@xxxxxxxxx> --- 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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel