sndcp: 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: If3c9287d839198dc079993c4d32780fb1c2bc6fd
This commit is contained in:
Pau Espin 2023-03-09 19:00:02 +01:00
parent 45c9641dca
commit 66d7bc2bae
1 changed files with 4 additions and 0 deletions

View File

@ -533,6 +533,8 @@ int osmo_gprs_sndcp_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;
}
@ -676,5 +678,7 @@ int osmo_gprs_sndcp_prim_dispatch_snsm(struct osmo_gprs_sndcp_prim *sndcp_prim)
/* Special return value '1' means: do not free */
if (rc != 1)
msgb_free(msg);
else
rc = 0;
return rc;
}