rlcmac: gprs_rlcmac_prim_call_down/up_cb(): Avoid propagating rc=1

rc=1 Only has meaning in call to rlcmac_down_cb().
gprs_rlcmac_prim_call_down_cb() called by internal rlcmac code
guarantess the prim is always freed, and hence returning 1 has not
meaning there.

Same applies for up direction.

Change-Id: Ibd9c44150e8dbec5fbaa98e14aa16703935dac71
This commit is contained in:
Pau Espin 2023-03-08 17:51:35 +01:00
parent 441fdec9d4
commit bab234c2ea
1 changed files with 6 additions and 0 deletions

View File

@ -362,6 +362,8 @@ int gprs_rlcmac_prim_call_up_cb(struct osmo_gprs_rlcmac_prim *rlcmac_prim)
/* Special return value '1' means: do not free */
if (rc != 1)
msgb_free(rlcmac_prim->oph.msg);
else
rc = 0;
return rc;
}
@ -452,6 +454,8 @@ int gprs_rlcmac_prim_call_down_cb(struct osmo_gprs_rlcmac_prim *rlcmac_prim)
/* Special return value '1' means: do not free */
if (rc != 1)
msgb_free(rlcmac_prim->oph.msg);
else
rc = 0;
return rc;
}
@ -559,5 +563,7 @@ int osmo_gprs_rlcmac_prim_lower_up(struct osmo_gprs_rlcmac_prim *rlcmac_prim)
/* Special return value '1' means: do not free */
if (rc != 1)
msgb_free(msg);
else
rc = 0;
return rc;
}