diff options
Diffstat (limited to 'net/caif/cfcnfg.c')
-rw-r--r-- | net/caif/cfcnfg.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c index df43f264d9fb..7c81974a45c4 100644 --- a/net/caif/cfcnfg.c +++ b/net/caif/cfcnfg.c | |||
@@ -308,19 +308,15 @@ cfcnfg_linkup_rsp(struct cflayer *layer, u8 channel_id, enum cfctrl_srv serv, | |||
308 | caif_assert(cnfg != NULL); | 308 | caif_assert(cnfg != NULL); |
309 | caif_assert(phyid != 0); | 309 | caif_assert(phyid != 0); |
310 | phyinfo = &cnfg->phy_layers[phyid]; | 310 | phyinfo = &cnfg->phy_layers[phyid]; |
311 | caif_assert(phyinfo != NULL); | ||
312 | caif_assert(phyinfo->id == phyid); | 311 | caif_assert(phyinfo->id == phyid); |
313 | caif_assert(phyinfo->phy_layer != NULL); | 312 | caif_assert(phyinfo->phy_layer != NULL); |
314 | caif_assert(phyinfo->phy_layer->id == phyid); | 313 | caif_assert(phyinfo->phy_layer->id == phyid); |
315 | 314 | ||
316 | if (phyinfo != NULL && | 315 | phyinfo->phy_ref_count++; |
317 | phyinfo->phy_ref_count++ == 0 && | 316 | if (phyinfo->phy_ref_count == 1 && |
318 | phyinfo->phy_layer != NULL && | ||
319 | phyinfo->phy_layer->modemcmd != NULL) { | 317 | phyinfo->phy_layer->modemcmd != NULL) { |
320 | caif_assert(phyinfo->phy_layer->id == phyid); | ||
321 | phyinfo->phy_layer->modemcmd(phyinfo->phy_layer, | 318 | phyinfo->phy_layer->modemcmd(phyinfo->phy_layer, |
322 | _CAIF_MODEMCMD_PHYIF_USEFULL); | 319 | _CAIF_MODEMCMD_PHYIF_USEFULL); |
323 | |||
324 | } | 320 | } |
325 | adapt_layer->id = channel_id; | 321 | adapt_layer->id = channel_id; |
326 | 322 | ||