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:
parent
441fdec9d4
commit
bab234c2ea
|
@ -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 */
|
/* Special return value '1' means: do not free */
|
||||||
if (rc != 1)
|
if (rc != 1)
|
||||||
msgb_free(rlcmac_prim->oph.msg);
|
msgb_free(rlcmac_prim->oph.msg);
|
||||||
|
else
|
||||||
|
rc = 0;
|
||||||
return rc;
|
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 */
|
/* Special return value '1' means: do not free */
|
||||||
if (rc != 1)
|
if (rc != 1)
|
||||||
msgb_free(rlcmac_prim->oph.msg);
|
msgb_free(rlcmac_prim->oph.msg);
|
||||||
|
else
|
||||||
|
rc = 0;
|
||||||
return rc;
|
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 */
|
/* Special return value '1' means: do not free */
|
||||||
if (rc != 1)
|
if (rc != 1)
|
||||||
msgb_free(msg);
|
msgb_free(msg);
|
||||||
|
else
|
||||||
|
rc = 0;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue