diff mbox series

[2/8] qmi: Ensure tid is initialized

Message ID 20240226153459.1463304-2-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 1a801dfb93db62ba2eb5e290e952274fad304d15
Headers show
Series [1/8] qmi: Use FAM instead of allocating a member | expand

Commit Message

Denis Kenzior Feb. 26, 2024, 3:34 p.m. UTC
When the qmi_request structure is allocated, the tid member is never
initialized properly.  This is usually okay since the request is
submitted afterwards, but it is still better to initialize this member
properly.
---
 drivers/qmimodem/qmi.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 652f19fb6cd0..be6f6f7bd601 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -202,6 +202,7 @@  static struct qmi_request *__request_alloc(uint8_t service,
 
 	msglen = hdrlen + QMI_MESSAGE_HDR_SIZE + length;
 	req = l_malloc(sizeof(struct qmi_request) + msglen);
+	req->tid = 0;
 	req->len = msglen;
 	req->client = client;