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:
parent
45c9641dca
commit
66d7bc2bae
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue