Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

i3c: mipi-i3c-hci: Stop reading Extended Capabilities if capability ID is 0

Extended Capability ID value 0 is special. It signifies the end of the
list. Stop reading Extended Capabilities if capability ID is 0.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260106164416.67074-3-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Adrian Hunter and committed by
Alexandre Belloni
0818e4aa 840688d8

+1 -1
+1 -1
drivers/i3c/master/mipi-i3c-hci/ext_caps.c
··· 271 271 cap_length = FIELD_GET(CAP_HEADER_LENGTH, cap_header); 272 272 dev_dbg(&hci->master.dev, "id=0x%02x length=%d", 273 273 cap_id, cap_length); 274 - if (!cap_length) 274 + if (!cap_id || !cap_length) 275 275 break; 276 276 if (curr_cap + cap_length * 4 >= end) { 277 277 dev_err(&hci->master.dev,