device_google_zumapro/usb
Kuen-Han Tsai e5f8be36ac Usb: Add status check to prevent NPE
This patch prevents a Null Pointer Exception in
queryMoistureDetectionStatus() when getPortStatusHelper() fails to open
the /sys/class/typec file. The failure results in an empty
currentPortStatus vector, causing the NPE when accessing its first
element.

Bug: 361097811
Flag: EXEMPT bugfix
Test: NPE does not occur when getPortStatusHelper() fails
Change-Id: I4657ab8dbc9bb7e5d2dc46c1a20b66477604ec36
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2024-10-09 14:50:09 +08:00
..
gadget UsbGadget: Update SDP enum timeout when gadget is pulled up 2024-08-20 18:36:29 -07:00
usb Usb: Add status check to prevent NPE 2024-10-09 14:50:09 +08:00