[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b177e736-e640-47ed-9f1e-ee65971dfc9c@linaro.org>
Date: Tue, 29 Oct 2024 15:38:10 +0000
From: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
To: Bjorn Andersson <andersson@...nel.org>, Rex Nie <rex.nie@...uarmicro.com>
Cc: heikki.krogerus@...ux.intel.com, gregkh@...uxfoundation.org,
linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, angus.chen@...uarmicro.com
Subject: Re: [PATCH] usb: typec: qcom-pmic: fix uninitialized value hdr_len
and txbuf_len
On 29/10/2024 15:28, Bjorn Andersson wrote:
>> + unsigned int val, hdr_len = 0, txbuf_len = 0, txsize_len;
> This stops us from printing uninitialized values, but the error print is
> now containing misleading/false data instead.
Yes, the point of the error printout is to also give an indication of
what data didn't transmit
hdr_len = sizeof(msg->header);
txbuf_len = pd_header_cnt_le(msg->header) * 4;
The default values of the header should probably just be latched @ the
top of this routine.
We assume *msg contains valid data so instead of init to zero we should
init as above.
Please do that for your V2 including
Fixes: a4422ff22142 (" usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
---
bod
Powered by blists - more mailing lists