input/ipaccess.c: propagate errors from ipa_parse_unitid()

Change-Id: Ic190daae31936959de8efb5a6de8744c016d5643
This commit is contained in:
Vadim Yanitskiy 2019-12-02 02:16:07 +07:00
parent 7c1c8cc710
commit 1c94f6a50e
1 changed files with 5 additions and 1 deletions

View File

@ -143,7 +143,11 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
}
unitid = (char *) TLVP_VAL(&tlvp, IPAC_IDTAG_UNIT);
unitid[len - 1] = '\0';
ipa_parse_unitid(unitid, &unit_data);
ret = ipa_parse_unitid(unitid, &unit_data);
if (ret) {
LOGP(DLINP, LOGL_ERROR, "Failed to parse unit ID '%s'\n", unitid);
goto err;
}
if (!line->ops->sign_link_up) {
LOGP(DLINP, LOGL_ERROR,