From f8533400191eb0d59ca06325aa8f1a0f96dc0b83 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 24 May 2010 06:29:34 +0000 Subject: [PATCH] --- yaml --- r: 202586 b: refs/heads/master c: 9bfca3c6e5965a01b7c6d8e2f2ea30799c9d43bc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/caif/cfcnfg.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 1cf0881b9dec..36ca21f861fb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5d72af9f3dfea67f014f880d00665f96622f57f +refs/heads/master: 9bfca3c6e5965a01b7c6d8e2f2ea30799c9d43bc diff --git a/trunk/net/caif/cfcnfg.c b/trunk/net/caif/cfcnfg.c index df43f264d9fb..7c81974a45c4 100644 --- a/trunk/net/caif/cfcnfg.c +++ b/trunk/net/caif/cfcnfg.c @@ -308,19 +308,15 @@ cfcnfg_linkup_rsp(struct cflayer *layer, u8 channel_id, enum cfctrl_srv serv, caif_assert(cnfg != NULL); caif_assert(phyid != 0); phyinfo = &cnfg->phy_layers[phyid]; - caif_assert(phyinfo != NULL); caif_assert(phyinfo->id == phyid); caif_assert(phyinfo->phy_layer != NULL); caif_assert(phyinfo->phy_layer->id == phyid); - if (phyinfo != NULL && - phyinfo->phy_ref_count++ == 0 && - phyinfo->phy_layer != NULL && + phyinfo->phy_ref_count++; + if (phyinfo->phy_ref_count == 1 && phyinfo->phy_layer->modemcmd != NULL) { - caif_assert(phyinfo->phy_layer->id == phyid); phyinfo->phy_layer->modemcmd(phyinfo->phy_layer, _CAIF_MODEMCMD_PHYIF_USEFULL); - } adapt_layer->id = channel_id;