rspro_client_fsm: Fix uninitialized return variable use

rspro_client_fsm.c:180:9: warning: ‘rc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  180 |  return rc;
      |         ^~

Change-Id: I64b275b06b2aa40bd7c6e1dd42afba5ffebd7b00
This commit is contained in:
Harald Welte 2019-12-15 00:10:57 +01:00
parent 071892974a
commit 9cdd094516
1 changed files with 3 additions and 1 deletions

View File

@ -162,8 +162,10 @@ static int srvc_read_cb(struct ipa_client_conn *conn, struct msgb *msg)
case IPAC_PROTO_EXT_RSPRO:
LOGPFSM(srvc->fi, "Received RSPRO %s\n", msgb_hexdump(msg));
pdu = rspro_dec_msg(msg);
if (!pdu)
if (!pdu) {
rc = -EIO;
break;
}
rc = srvc->handle_rx(srvc, pdu);
ASN_STRUCT_FREE(asn_DEF_RsproPDU, pdu);
break;