]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier
authorRex Nie <rex.nie@jaguarmicro.com>
Wed, 30 Oct 2024 13:36:32 +0000 (21:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Nov 2024 12:54:54 +0000 (13:54 +0100)
commit029778a4fd2c90c2e76a902b797c2348a722f1b8
tree24c933439251280d99eda6bc89271dcc065adca9
parent498dbd9aea205db9da674994b74c7bf8e18448bd
usb: typec: qcom-pmic: init value of hdr_len/txbuf_len earlier

If the read of USB_PDPHY_RX_ACKNOWLEDGE_REG failed, then hdr_len and
txbuf_len are uninitialized. This commit stops to print uninitialized
value and misleading/false data.

Cc: stable@vger.kernel.org
Fixes: a4422ff22142 (" usb: typec: qcom: Add Qualcomm PMIC Type-C driver")
Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Acked-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20241030133632.2116-1-rex.nie@jaguarmicro.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c