lkml.org 
[lkml]   [2010]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/5] staging: slicoss: Move NULL pointer assertion to else branch
    Date
    Move NULL pointer assertion to else branch because it can
    become NULL only here.

    Signed-off-by: Kulikov Vasiliy <segooon@gmail.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


    \
     
     \ /
      Last update: 2010-06-27 15:25    [W:0.041 / U:0.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site