llc: Avoid propagating rc=1
Those functions guarantee to the caller that the prim is always freed,
and hence returning 1 has not meaning there.
Fix similar to bab234c2ea
in rlcmac layer.
Change-Id: Icdee1cac4df970ae2ee7539d72c5a82667016160
This commit is contained in:
parent
9eb8ef1c3f
commit
45c9641dca
|
@ -183,6 +183,8 @@ int gprs_llc_prim_call_down_cb(struct osmo_gprs_llc_prim *llc_prim)
|
|||
/* Special return value '1' means: do not free */
|
||||
if (rc != 1)
|
||||
msgb_free(llc_prim->oph.msg);
|
||||
else
|
||||
rc = 0;
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -212,5 +214,7 @@ int osmo_gprs_llc_prim_lower_up(struct osmo_gprs_llc_prim *llc_prim)
|
|||
/* Special return value '1' means: do not free */
|
||||
if (rc != 1)
|
||||
msgb_free(msg);
|
||||
else
|
||||
rc = 0;
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue