diff mbox series

[v2,07/11] qmi: gprs-context: Treat IP family TLV as mandatory

Message ID 20240711164936.1688973-7-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 90db5ebd6aef3bcc57c5dec1d2014a995fa6d294
Headers show
Series [v2,01/11] gobi: Limit number of premultiplexed contexts to 4 | expand

Commit Message

Denis Kenzior July 11, 2024, 4:49 p.m. UTC
Also, while here, coalesce two debugging statements into one.
---
 drivers/qmimodem/gprs-context.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/gprs-context.c b/drivers/qmimodem/gprs-context.c
index f29f10720710..203a320a42af 100644
--- a/drivers/qmimodem/gprs-context.c
+++ b/drivers/qmimodem/gprs-context.c
@@ -46,10 +46,10 @@  static void pkt_status_notify(struct qmi_result *result, void *user_data)
 	if (!status)
 		return;
 
-	DBG("conn status %d", status->status);
+	if (!qmi_result_get_uint8(result, RESULT_IP_FAMILY, &ip_family))
+		return;
 
-	if (qmi_result_get_uint8(result, RESULT_IP_FAMILY, &ip_family))
-		DBG("ip family %d", ip_family);
+	DBG("conn status %d ip family %d", status->status, ip_family);
 
 	switch (status->status) {
 	case QMI_WDS_CONNECTION_STATUS_DISCONNECTED: