From 48cca618fb6fcfa63619af8ad62d0095ec431e71 Mon Sep 17 00:00:00 2001 From: Ryan Erickson Date: Thu, 24 Feb 2022 14:00:43 -0600 Subject: [PATCH] modem: hl7800: fix +CFUN handler Fix the +CFUN command handler to find the end of the message properly. Signed-off-by: Ryan Erickson --- drivers/modem/hl7800.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/modem/hl7800.c b/drivers/modem/hl7800.c index b16600639e6..45185ef3e1c 100644 --- a/drivers/modem/hl7800.c +++ b/drivers/modem/hl7800.c @@ -3336,15 +3336,15 @@ done: static bool on_cmd_modem_functionality(struct net_buf **buf, uint16_t len) { - struct net_buf *frag = NULL; + struct net_buf *frag; size_t out_len; char rsp[MDM_HL7800_MODEM_FUNCTIONALITY_SIZE]; wait_for_modem_data_and_newline(buf, net_buf_frags_len(*buf), MDM_HL7800_MODEM_FUNCTIONALITY_SIZE); - len = net_buf_findcrlf(*buf, &frag); frag = NULL; + len = net_buf_findcrlf(*buf, &frag); if (!frag) { LOG_ERR("Unable to find end of response"); goto done;