diff --git a/drivers/modem/alt1250/alt1250.c b/drivers/modem/alt1250/alt1250.c index 97a4e7e2a7..336f941fd7 100644 --- a/drivers/modem/alt1250/alt1250.c +++ b/drivers/modem/alt1250/alt1250.c @@ -819,7 +819,7 @@ static int parse_altcompkt(FAR struct alt1250_dev_s *dev, FAR uint8_t *pkt, uint16_t cid = parse_cid(h); uint16_t tid = parse_tid(h); parse_handler_t parser; - FAR alt_evtbuf_inst_t *inst; + FAR alt_evtbuf_inst_t *inst = NULL; FAR void **outparam; size_t outparamlen; @@ -912,7 +912,7 @@ static int parse_altcompkt(FAR struct alt1250_dev_s *dev, FAR uint8_t *pkt, *bitmap = ALT1250_EVTBIT_REPLY; } } - else + else if (inst != NULL) { /* Unlock outparam because it has been updated. */